المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Retrieving USB Barcode scanner data...



C# Programming
05-13-2009, 05:02 AM
Now I know that almost all USB barcode scanners type to whatever you have focused...

The problem I am facing is I want to scan something, then it querys a database based upon that barcode scanned. I had just focused a textbox for this, but when I got the scanner today I noticed something that I didn't think about... The scanner doesn't "paste" the data in the textbox. It literally types it out.

So I have a on text change to query the database with whats in the textbox. Is there another way I should be doing this? The length of characters for the barcode we will be scanning is not always the same. So I can't do it based on length of whats in the textbox.

I was wondering if there was a way to read it like you do a serial port scanner and have it not go into a textbox? I have googled and searched for this but have not found anything yet for doing this with a USB barcode scanner.