Is there a way to intercept USB Barcode Scanner input, utilize it, then pass it on to the application that has focus?
We currently use Barcode scanners load order sh
You can use the SendInput function to send keystrokes to the currently focused window, as long as that window has a lower or equal integrity level. Plenty of information on the web for calling that function from C#.
Many barcode readers can be configured to put an arbitrary keycode at the start of a scan. Have it output a code that you have defined as a hotkey on your PC to start up your program or bring it to the foreground. Once you've input the barcode, destroy or hide your window to restore focus to the previous application and call SendInput.
To a computer, a barcode scanner is just like a keyboard, without the keys. When you scan a barcode, the scanner converts the barcode into keyboard input. In order to capture the input in a second program, you'd need to use a keyboard hook.
Look at this project and this project. You can make a program that uses one of these keyboard hooks and any data you scan with your barcode scanner will get routed to your program too.
You will want to create a windows Form and in the Load event of the form, give focus to the TextBox that the barcode should be entered into. Then in the TextChanged event of the TextBox, do whatever processing you need to.
http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.aspx
Misunderstood the question, try googling a little bit:
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/5213874a-603e-4378-835d-f6488f382d47