Click here to Skip to main content
15,902,189 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi, i want to ask how to know when a barcode reader scan a data. I need to know the trigger because i want to put the scanned data in the appropriate textbox wherever the focus is. i'm already search in the internet, it can be done by import Symbol.Barcode.BarcodeReader, but it can only be used in smart device project. I wonder if there any similiar library in windows application. Thanks for your answer...
Posted

Hi,

normally a barcode reader acts as a keyboard (at least the ones I have worked with). So all you have to do is set the input focus to the TextBox and then scan the code. This way your application does not need a special handling for the reader.

Best regards
 
Share this answer
 
Comments
endyxxx 20-Jun-10 3:47am    
hi JF2015, in my application there is more than 1 textbox, so i have to make sure that the scanned data placed in the right textbox.

for example :

code : textbox1 -> enabled
name : textbox2 -> disabled
quantity : textbox3 -> enabled

first, the focus in the textbox1. after user scan a barcode, textbox2 is automatically filled with the data in database. then the focus is move to the textbox3. but if user scan a barcode again, the scanned data will placed in textbox3. i want to make sure that anytime user scan a barcode (wherever the focus is), the scanned data will placed in textbox1

thx for answering
If you want to ensure that every item is scanned in a different text field, you may need to choose a barcode reader that after scanning the code adds CR LF (return) - most barcode readers can be configured to do so. This allows you to determine the end of the code and place the input focus on the next control.
 
Share this answer
 
Comments
endyxxx 25-Jun-10 7:21am    
thanks JF2015!!

i program the barcode reader to add CR LF ( or prefix sufix ) and set the form properties 'Key Preview' to true. and in the event myBase.Key_Press i can handle the scanned data..

once again thanks JF2015 !!

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