Barcode scanning

S

Samuel Shulman

I assume that when I use a barcode reader (at least some of them) it will
input the number as though it was entered in via the keyboard

How can I then get the value without setting to focus to a textbox control I
don't want the user to see the scanned number but I still need a way to read
the value, in addition, I need an event that will be fired once the barcode
was read in full so I know it actually finished reading

Thank you,
Samuel
 
B

Brian Tkatch

Samuel said:
I assume that when I use a barcode reader (at least some of them) it will
input the number as though it was entered in via the keyboard

How can I then get the value without setting to focus to a textbox control I
don't want the user to see the scanned number but I still need a way to read
the value, in addition, I need an event that will be fired once the barcode
was read in full so I know it actually finished reading

Thank you,
Samuel

Just a guess.

On the form's keypress start a one-second timer and capture all keys.
In the timer tick event, (turn the timer off and) validate the keys. If
it is a barcode, deal with it, otherwise give focus and set the text
property to the captured keys.

Or something like that. That idea would need a lot of tweaking to
handle all cases.

B.
 
S

Samuel Shulman

Thanks Brian,
any idea about a control that is invisible and may receive the key strokes?
 
D

Dick Grier

Hi,

IMO, attempts to do this (setting focus to a textbox or other object to
receive the scans) is doomed to "limited" success. The best solution, IMO,
is to insist on a serial barcode reader (or a USB reader that provides a
serial -- not HID emulation). Then, no matter what the user does, the scans
will be delivered to the appropriate code for processing. Fortunately,
serial readers are not much more expensive that those that emulate a
keyboard (perhaps and extra $15), but the operational experience is MUCH
better.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
P

PGC

Hi Samuel,

A simple keyboard "wedge" type scanner will do what you want and most can be
programmed to send some "end of message" character although this is usually
a CR. Your keypress event can trap the EndOfMessage and then lookup the
product table (or whatever) as required. You will need to display the
textbox to capture the barcode data for a number of good reasons ...
The keyboard requires an input focus, the user gets the visual feedback
(good for problem solving), and finally, if the barcode is unreadable, (you
always get stuck behind these people at checkouts), the user at least has
the opportunity of keying it in!!

If you really don't want the gui to capture the barcode data then Dick's
suggestion (USB or Serial) port scanner is the best option but you will need
to learn about how to program for these (serial port) devices. You will also
need to figure out what to do about unreadable or mis-read codes.

Hope this helps.

Paul
 
B

Brian Tkatch

Samuel said:
Thanks Brian,
any idea about a control that is invisible and may receive the key strokes?

Nope.

I thought maybe the form got it first.

Either that or have one function handle all the form's control's
keypress events.

B.
 
B

Brian Tkatch

Dick said:
Hi,

IMO, attempts to do this (setting focus to a textbox or other object to
receive the scans) is doomed to "limited" success. The best solution, IMO,
is to insist on a serial barcode reader (or a USB reader that provides a
serial -- not HID emulation). Then, no matter what the user does, the scans
will be delivered to the appropriate code for processing. Fortunately,
serial readers are not much more expensive that those that emulate a
keyboard (perhaps and extra $15), but the operational experience is MUCH
better.

Dick

Yep. Just like to say i agree with this sentiment.

B.
 
S

Samuel Shulman

Please excuse me for being so naive (I am new to POS systems)
What is IMO and what is HID

Thanks,
Samuel
 
B

Brian Tkatch

Samuel said:
Please excuse me for being so naive (I am new to POS systems)
What is IMO and what is HID

Thanks,
Samuel

IMO is "In My Opinion"
HID is "Human Interface Device"

Q:What does PC-MCIA stand for?
A:people Can't Memorize Complex Industry Acronyms

BTW, a good URL is <URL:www.acronymfinder.com>, HTH.

B.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top