Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I need to add barcode reading feature to my application. I donot know how to enable my application to read barcodes.
I mean a scanner should read the barcode and having matched the article no. in database, info should be displayed on the screen.
Any code examples please?

Thanks
Posted

Normally, this is not a problem - most barcode readers just plug in and act as a secondary input device. So when you want the barcode, you scan and the Article Number is entered as if it had been typed at the keyboard. It is often possible to configure them to use special prefixes, or to talk only when spoken to, but that requires a good read of the manul, or a talk to the manufacturer.

So. You don't need any code - it acts as a keyboard!
 
Share this answer
 
Comments
Furqan Sehgal 15-Oct-11 12:00pm    
Thanks ! but how shall I specify which field or textbox on my form the article no. goes, when read using a barcode scanner?
OriginalGriff 16-Oct-11 3:02am    
Will depend on your scanner: talk to your manufacturer. Normal operation is that the data just comes in as a sequence of keystrokes - so you can't make it go anywhere unless the text cursor is there.
davfeu 17-Oct-11 5:46am    
Most barcodescanners are configurable to use a start- and/or stop(key/keysequence). So you could use that to determinate if the input is a barcode or not.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900