I understand the barcode scanner is like a keyboard and acts as such. What I need is a scanner that has some sort of api (.net/c# preferably) that i can plug into my app. Is there a particular scanner hardware vendor devs have used or are currently using, that has a .net api? or can I use any arbitrary scanner and build an api around it or use one of the open source ones?
So 1 thing I would like to do, is be able to get the value off the usb scanner without placing the cursor on the particular text field.
Thanks
To stay on a scanner that acts like a keyboard you could also try, to detect all key pressed within your whole application. To get a
KeyPressevent within your application you should setForm.KeyPreviewtotrueand register to the above mentioned event of your form.Now you’ll receive every key before it is send to the current active control and you can do with it, whatever you like. To prevent that it will send to the current active control after you have done your work, set
e.Handledtotrue.But this solution has definitely two drawbacks: