i need help with barcodes



I am trying to make a barcode application.
I have my own finished program but customer wanted me to make it work
with card system, So i need barcode programming.
I know it is working like, it sends some numbers or keys to a field.
But how can it know which field or which textbox to fill in?
Should i write some codes where to send?
Or how it works..
Thank you..

.