|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Barcode Reader Application -- HELPI have an application that uses input from a barcode reader via a USB port. My application works fine only if the application HAS FOCUS. If the user opens up another application (not mines) such as notepad/word, etc, the Barcode Reader reads data into the applicaton that currently has focus with is notepad/word but not my own applicaton. My question is as follows: Is there a way to write a Listener Class/Windows Service to ALWAYS direct the Data that the barcode reader reads in into my own application even though it does not have focus? The reason that i'm doing this is to be able to provide 2 users using the same machine...One user used the BarCode Scanner and the other person can still use the computer to work on aother applications. Much Thanks, Neil <neilp***@gmail.com> wrote in message
news:1140029684.672167.124510@z14g2000cwz.googlegroups.com... No help here... just mentioning that "who ever" wrote the interface for that > Hi all, > > I have an application that uses input from a barcode reader via a USB > port. My application works fine only if the application HAS FOCUS. utility/driver was a complete nut and it probably came from the same place the VB6 version did... which worked the exact same way. Silly. Thankfully, I've only had to "read" about the problems instead of actually experiencing them (wonder if the author of that utility/driver ever heard the term "multi-tasking") -- Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com Please keep all discussions in the groups.. I think you use the barcode-keyboard-emulator which sends the barcodes as
keystrokes to the active application. What you need is a dll which gives you events when a barcode is scanned. Look for a SDK for your scanner. Best regards Kay <neilp***@gmail.com> skrev i melding Show quoteHide quote news:1140029684.672167.124510@z14g2000cwz.googlegroups.com... > Hi all, > > I have an application that uses input from a barcode reader via a USB > port. My application works fine only if the application HAS FOCUS. > If the user opens up another application (not mines) such as > notepad/word, etc, the Barcode Reader reads data into the applicaton > that currently has focus with is notepad/word but not my own > applicaton. > > My question is as follows: Is there a way to write a Listener > Class/Windows Service to ALWAYS direct the Data that the barcode reader > reads in into my own application even though it does not have focus? > > The reason that i'm doing this is to be able to provide 2 users using > the same machine...One user used the BarCode Scanner and the other > person can still use the computer to work on aother applications. > > Much Thanks, > Neil > Generally barcode scanners can be configured to send an ascii control code
at the start and or the end of a scanning sequence (Check the user manual) what you have to do is write a global keyboard message hook to watch the beginniing and ending characters of a scan (And capture all in between). An example of vb code for a keyboard hook can be found here http://www.freevbcode.com/ShowCode.asp?ID=728 Steve Hall <neilp***@gmail.com> wrote in message Show quoteHide quote news:1140029684.672167.124510@z14g2000cwz.googlegroups.com... > Hi all, > > I have an application that uses input from a barcode reader via a USB > port. My application works fine only if the application HAS FOCUS. > If the user opens up another application (not mines) such as > notepad/word, etc, the Barcode Reader reads data into the applicaton > that currently has focus with is notepad/word but not my own > applicaton. > > My question is as follows: Is there a way to write a Listener > Class/Windows Service to ALWAYS direct the Data that the barcode reader > reads in into my own application even though it does not have focus? > > The reason that i'm doing this is to be able to provide 2 users using > the same machine...One user used the BarCode Scanner and the other > person can still use the computer to work on aother applications. > > Much Thanks, > Neil > Hi,
IMO, there is no good way to do this. So, my recommendation it to use a scanner with a serial interface. Then, there is no such problem. All barcode reader manufacturers provide models with RS-232 serial interfaces for just this reason. If you have to use it with a PC that has only a USB interface, you still have the option of adding a serial UAB adapter. Dick -- Richard Grier, MVP Hard & Software Author of Visual Basic Programmer's Guide to Serial Communications, Fourth Edition, ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004. See www.hardandsoftware.net for details and contact information. Hi Steve, Dick,
I really appreciate both of your help and input. Steven, keyboard hook approach would probably be the easiest though there is a side effect to this approach. When I've tried the sample application via the download, the hook even works fine...but it places the INPUT in BOTH Application. My main goal is to "Redirect" the input of the scanner to one application reguardless if it has focus or not, in foregroud or background. Dick, your approach seems very plausible but I have never programmed on I/O devices other than Mouse/Keyboard. So i'm not sure if I could "preformed" the code nessecary to do this type of I/O redirection. Thanks Guys!!! Neil
Resize problem (in IDE)
Broken References Windows Services works for years/months/weeks, then chokes New bee:How do i make an .exe file in VS 2005? DimeAttachment save to disk Count lines in multi-line textbox Using a Structure in a Class Zoom in Cephalometric system Problems with Excel Object Library Connection Properties Dialog Box? |
|||||||||||||||||||||||