Question Get keyboard keyPress

mamali80

New member
Joined
Jul 21, 2012
Messages
1
Programming Experience
Beginner
Hi,
I am working on a windows service application that required to get the barcode reader characters and saving the value in database, I have tried some methods like this one:

Processing Global Mouse and Keyboard Hooks in C# - CodeProject

But they not working in the windows service app, does anyone knows how can I get the keyboard/barcode reader characters in the windows service?
Appreciate the help in advance,
Regards,
 
In order to interact with the keyboard, mouse, or desktop, a service has to be marked as Interactive, and this is frowned upon since Windows Vista. It's still possible to do what you want but it's certainly not the best approach. I have a feeling that any AV program worth a dime would yell out at the sight of a service hooked into global keyboard events.
 

Latest posts

Back
Top