Link to home
Start Free TrialLog in
Avatar of SniperCode Sheva
SniperCode Sheva

asked on

How to input barcode scanner data into textbox in C# ?

Hi All,
I am working on a project where i need to input scanned data from bar code to a text box  when user scan a item/ product.
I tried this sample but when I scan a product the barcode is not showing but something else ...
Do you have any idea or any solution ?
Thank you.
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

barcode reader should be treated as a computer input device. it reads what is contain within the barcode.

so as far as I understand, you no need to do any programming for this part. just make sure your barcode contain "valid data".
Do you want to display the barcode in a textbox ?
Avatar of SniperCode Sheva
SniperCode Sheva

ASKER

Yes, I am doing an application for a shop. So when I scan the product from the barcode scanner device it automatically display in the textbox
OK.  What font are you using for the textbox?
I am not using any kind of font... Which font I may use ?
So when I scan the product from the barcode scanner device it automatically display in the textbox
just make sure the cursor is on your textbox?
>>I am not using any kind of font

Oh yes you are.  It is the font set to that textbox when you create it.  (Check the properties of the textbox in your design editor).  

To display the barcode you will need a font which displays barcodes !
And the font ? Because when I scan I am getting some characters like w+d&f
I'd suggest googling until you find a freely available font.

ps.  Your code probably works, it is just displaying the standard characters rather than the special ones for the barcode.
I tried with a Honeywell USB Scanner the barcode is EAN 13 but if I take the EAN 13 font it will displayed like the barcode in the item...
OK, that is exactly what you asked for.

>>Do you want to display the barcode in a textbox ?
>>Yes...
I need only to display the numbers of the barcode not the whole barcode
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial