Find which device is sending input

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a program where it print reports with barcode which is the primary
key. Is there anyway I can find through vb code where the input is coming
from? I would like to find in code if the input is coming from a scanner or
the keyboard. That way if I know its from the scanner I can just find the
record and display it.

Thanks
 
If the scanner is a "keyboard wedge" type, the only way would be to
configure the scanner software to include some sort of a tag in each
burst of "keystrokes" it sends. AFAIK most scanners allow you to specify
an end-of-string character: if you use something that's unlikely to be
generated by the keyboard (perhaps a control character such as VT -
vertical tab) you can monitor the input for that.
 
Back
Top