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.
C#

Avatar of undefined
Last Comment
Ryan Chong

8/22/2022 - Mon
Ryan Chong

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".
AndyAinscow

Do you want to display the barcode in a textbox ?
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
Your help has saved me hundreds of hours of internet surfing.
fblack61
AndyAinscow

OK.  What font are you using for the textbox?
SniperCode Sheva

ASKER
I am not using any kind of font... Which font I may use ?
Ryan Chong

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?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
AndyAinscow

>>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 !
SniperCode Sheva

ASKER
And the font ? Because when I scan I am getting some characters like w+d&f
AndyAinscow

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 started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
SniperCode Sheva

ASKER
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...
AndyAinscow

OK, that is exactly what you asked for.

>>Do you want to display the barcode in a textbox ?
>>Yes...
SniperCode Sheva

ASKER
I need only to display the numbers of the barcode not the whole barcode
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Ryan Chong

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.