How can I read barcodes without having the user focus a text box first?

Atlas picture Atlas · Apr 22, 2010 · Viewed 11k times · Source

I recently acquired a Metrologic Barcode scanner (USB port), as everyone already knows it works as a keyboard emulator out of the box.

How do I configure the scanner and my application so that my app can process the barcode data directly? That is, I don't want the user to focus on a "Text field" and then process the data when the KeyPress event fires.

Answer

Harriv picture Harriv · Apr 22, 2010

Usually barcode scanners can be configured to send some characters before and after the string. So if you append eg "F12" before the barcode string, you can capture that and move the focus to the right field.

Check the barcode scanner manual how to do that.