Click here to Skip to main content
13,192,426 members (47,883 online)
Rate this:
Please Sign up or sign in to vote.
hi guys ,
i develop a Point of Sale application and i have to use barcode , i searched a lot about using barcode in WPF application and i found that barcode act like keyboard so when i scan a barcode a keydown Event is fired (as a key of keyboard is press) the problem that can not distinguish between keyboard press or barcode press i want to get just the code pressed by barcode and ignore the keyboard press
i found many articles talking about that talking about (Raw input Api) and others says may i deal with time consumed to scan the Code (barcode is faster than the keyboard )i cant treat with (Raw input API) can not understand it , and also the second solution is not acceptable for me (i think it is not logic to make all my operations depend up on the time ) , i found this article talking about the problem[^]

but did not solve my problem , so any one can put me on the right way
thanks in advanced
Posted 13-Sep-12 16:53pm
Sergey Alexandrovich Kryukov 13-Sep-12 23:09pm
Yes, you are not the first one who asks about this problem. I'm starting to think that the idea to give a barcode scanner a keyboard device interface ("easy" :-) was a lousy idea... :-)
yayaNasr 13-Sep-12 23:15pm
how ?
Sergey Alexandrovich Kryukov 13-Sep-12 23:28pm
How what? How lousy or how to distinguish? :-)
Sorry, I don't know how to distinguish, otherwise I would post an answer. Did you try to look at event parameters and see if you can find a difference?

And by the way, what do you mean by "but did not solve my problem"? What exactly happened? And did you try to ask the author of the article your question? -- always a good idea.
yayaNasr 13-Sep-12 23:31pm
i downloaded the source code and tested it nothing happen when i scan a barcode or press button from keyboard
Not much, I must say. Pressing a button and expecting the result is not enough for getting a thing to work. Did you try to locate the problem under debugger? Again, it would be better if you could address the author of this work.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171017.2 | Last Updated 13 Sep 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100