Hi,
Reading barcodes requires hardware. There are at least three different ways
to interface purpose-build readers (ones that do not use cameras or
scanners). You can use a reader that uses a keyboard "wedge." This inserts
scanned data, just as though it had been typed at the keyboard. You set
focus to a textbox, and read the data in the KeyPress event. A similar
alternative is to use a USB scanner. These are installed as a keyboard, and
work the same way as the "wedge" type devices, but connect to the USB port,
instead of inline with the keyboard. My preference is to use barcode
readers that use a serial interface. You then can use MSComm (or
equivalent) to read the data, and there is no issue with maintaining focus
in a textbox -- thus this form of hardware seems, to me, to be more
"industrial strength." There are a variety of manufacturers of all of these
devices.
I have example code for serial barcode readers in my book.
Dick
--
Richard Grier (Microsoft Visual Basic MVP)
See
www.hardandsoftware.net for contact information.
Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.