I have an application that prints eTicke开发者_如何转开发ts. Originally I used the cool 2-D bar code because it allowed me to use the GUID as the code. However scanners that can scan 2-D bar codes are way too expensive. So now I just use any of the codes that the Telerik Reporting too offers, like code39 http://demos.telerik.com/reporting/barcodes/demo.aspx
I want to allow people to scan the bar code with a scanner connected to the host computer via USB. The scanned code should automatically appears on the textbox of either the Web Form or win Form.
What USB Hand-held scanners do you recommend in the sub-$100 range?
I just got the "Adesso NuScan 1000U Bar Code Reader"
If you use it on a Web Form, it works like this: You click in the textbox, when developing the page you may want to use a javascript focus to make sure that the textbox is pre-selected.
Then you scan the bar code.
The scanner will put the bar code directly into the textbox and hit the return key.
If you are using .net web forms I would recommend putting your form in a asp:panel and in the panal properties set the default button to the button id. This way the correct button will be hit on return.
Here's the details of my results: Bar Code Scanning for eTicketing software
As far as the USB scanners go, this isn't the site for that kind of question. However, you may want to look on Google Shopping.
Many of the barcode scanners turn the image into a numerical sequence based on the width of the bars. Given that they do that I've seen a few of these scanners act as a HID [keyboard/mouse input device]. I would instruct the user to put the cursor in a text box and scan, or type the bar code number in manually. After there is a text change, send a AJAX request or postback to handle the logic from there.
you could go through the trouble of implementing a webcam as a barcode scanner. Google returns lots of results. Here's one from sourceforge:
http://sourceforge.net/projects/zbar/
This has the benefit of being really cheap and available to many people, but it doesn't work as awesomely as does a real scanner.
精彩评论