Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, I am building a Visual Basic

Status
Not open for further replies.

MiniMe2

Programmer
May 19, 2002
15
US
Hi,

I am building a Visual Basic application that will use both the keyboard and a barcode scanner for user input. Is there a way that my application can discern which input device was used? I would like for the application to know which input device was used after each entry.


Thanks,

MiniMe2
 
If your scanner allows you at add a suffix so when it send the data it appends something on the end of it. Then you inspect it for that character and strip off.

If Right(myData) = "x" then
'it came from the scanner
end if
DougP, MCP
 
If it's a barcode scanner between keyboard and computer,
then it's very simple.


Private Sub text1_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = vbKeyF2 Or KeyCode = vbKeyReturn Then

endif
endsub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top