I am trying to write a program that can read barcode scanners. Also, I need input, whenever there is no window in application focus (i.e., running in system tray)
I found this article, the title, which seems to solve, the exact problem is working very well, it detects my device and handles the WM_INPUT message.
However, checking to see if RAWINPUT.keyboard.Message is WM_KEYDOWN (0x100). It does not seem that adding a console to the only line of code given in the code is changed into i. Oat Type to output the actual values of that message:
Console.Out.WriteLine ("message: {0}", raw keyboard .tostring ("X"); If (raw.keyboard.Message == NativeMethods.WM_KEYDOWN) {....
is it that outputs it:
Message: B Message: 1000 messages: 3 messages: 1000 messages: 3 messages: 1000 messages: 5 messages: 1000 messages: 3 messages: 1000 messages: 8 messages: 1000 messages: 8 messages: 10008 messages: 4 messages: 10004 Message: 9 messages: 1000 9 messages: 9 messages: 1000 9 messages: 3 messages: 10003
This value is achieved when it is completed correctly:
257232709
The Notepad was verified by scanning.
I do not know the operation system is relevant here, but I thought I should tell that I'm running it in Windows 7 64 and Visual Studio 2010 and in the .NET Framework 3.5 Scanner is a USB Barcode Scanner , Symbol LS2208, is set as "HID keyboard emulation"
Just wanted to add, Microsoft POS A free library to create service system points from .net, Microsoft, you Gives settled common barcode allowed to read the scanners, and the scan gives you an event when the barcode. The library is free and is very well supported, and works with any barcode scanner that has an OPOS driver.
Comments
Post a Comment