Click here to Skip to main content
13,198,563 members (22,403 online)
Rate this:
Please Sign up or sign in to 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?

Posted 15-Oct-11 5:26am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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!
kfsehgal 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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2


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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171020.1 | Last Updated 27 May 2015
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100