Re: Barcode scanner with C#
I am not going to write the code but it is very very simple.
1: Configure the device to add a CR after each scan.
2: Place code in the keypress event to check if the keypressed is the enter key.
3: Place whatever code you want to process the barcode when the test is true.
As for configuring the device that depends on the device but I have never saw one that did not have this capability. Normally there are several barcodes in the manual that you can scan to setup the device. They will normally allow you to set it for the type of barcodes you want to decode and normally allow you to add a prefix and/or suffix to the data. In this case you would add a CR as the suffix so the device will send a CR after each decoded string.
Always use [code][/code] tags when posting code.