Click here to Skip to main content
15,889,931 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I'm new to programming, I've been asked to create a software that scans barcodes using a handheld Motorola Barcode Scanner, from what I've read these scanners are recognized as a keyboard by the computer.

I'm only finding code foe WPf and I'm using WinForms.

Please Help.

What I have tried:


[^]
Posted
Updated 4-Sep-17 3:36am
Comments
CPallini 4-Sep-17 8:43am    
If your device acts like a keyborad, what is your trouble with?
Kornfeld Eliyahu Peter 4-Sep-17 9:26am    
"I'm only finding code foe WPf and I'm using WinForms."

As we all know handling keyboard input in WinForms is very difficult (compared to WPF of course)...
CPallini 4-Sep-17 15:19pm    
As we all know handling keyboard input in WinForms is very difficult
Really (I don't know WPF)?
Les Mok 5-Sep-17 3:47am    
I have never used bar code scanners before and the whole keyboard thing is what I read on the internet, What I'm asking for is help regarding how to go about it, something like a tutorial specifically on WinForm, the one's I've seen are WPF.

1 solution

Most barcode scanners come configured as a keyboard - and as such when you scan an item, you get an Article Number exactly as if the user had read it from the human readable section and typed it in - you don't need to do anything specific in either Winforms or WPF to handle the scanned data unless you need to know when the data starts and ends. In that case, the first thing you need to do is talk to the manufacturer of your scanner and find out how to configure it to provide lead in and trailing indicators.

When you have that, you can detect them (the manufacturer will probably provide code examples as well) - but until then, it's just keyboard data, nothing else.
 
Share this answer
 

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