Solved

Capture keystrokes in background

Posted on 2008-10-28
2
1,114 Views
Last Modified: 2012-05-05
I am trying to write a program that will capture data from a USB barcode scanner (in keyboard wedge mode) while running minimized. I've found several different chunks of code, most for VB6, but none of them have worked for me.
0
Comment
Question by:Tharo_Systems
2 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 250 total points
ID: 22823331
So you are working in VB.Net 2005?

In Keyboard Wedge Mode, the barcode data will look like any other keystrokes being typed by the user.  Is your scanner setup to send a special sequence before the barcode so that you will know when one is being sent?

If so, we can use a low level keyboard hook to look for the sequence and then capture the next XXX keystrokes...assuming that all of your barcodes are the same length.  If not, then you would need a beginning AND ending special keystroke to be able to recognize the barcode.

If no special keystrokes are being used then it becomes very difficult and clunky to do this...
0
 

Author Closing Comment

by:Tharo_Systems
ID: 31510719
I appreciate your response. Considering what you've said, I think I will go about it a different way. Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now