Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I Have a Windows Application in VB.NET . I want to know the value is entered user is coming from BARCODER READER OR KEYBOARD .. Because I want to store values come from
Keyboard in Different Database and Barcode values in Different Database ..
So please let me Know how to dis... or Any URLS ....
Posted
Comments
Valery Possoz 5-Jan-13 14:40pm    
Have a look here: http://www.codeproject.com/Articles/17123/Using-Raw-Input-from-C-to-handle-multiple-keyboard

This article will show you how to do it. It's not that trivial. Good luck.
Sergey Alexandrovich Kryukov 23-Apr-13 11:16am    
In reply, OP spammed this page with 3 fake "answers", please see. Reported for abuse.
—SA
Sergey Alexandrovich Kryukov 23-Apr-13 11:15am    
Not a question.
—SA

1 solution

If you're using a "keyboard wedge" bar code scanner, you can't. To the system, it appears as if the barcode was coming from the keyboard.

The work around for this requires you to configure the barcode scanner to send prefix and postfix characters to the barcode when it scans a barcode. You then have to set the "KeyPreview" property on your form to True and write code for the forms KeyDown event to look for and track the progress of the barcode prefix characters. Once you have seen that prefix, you can gather up all the keypresses in the barcode until you see the postfix characters. Then you've got your barcode.

If you REALLY want to seperate the two without jumping through flaming USB code or specially coded forms, use a barcode scanner with a different interface, either Serial or Ethernet based. It makes thing a lot easier to tell where things are coming from.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900