By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,779 Members | 1,498 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,779 IT Pros & Developers. It's quick & easy.

USB Barcode Scanner

P: n/a
Jay
I have a barcode scanner with a USB interface. It acts as a keyboard (ie if I scan a barcode, it is
placed at the text cursor as if I'd typed it on the keyboard).

I'd like to bypass this behaviour so barcodes don't go to the text cursor, but instead go into my C#
programme, even if it doesn't have focus.

How do I do this? I somehow need to re-asign its output to my C# programme.
Jan 31 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Two possibilities. If the barcode scanner is configurable to the
point where you can prepend any barcodes with a keystroke like
windows-b then you can set up a global hook to listen for this
keystroke and then presumably read the rest of the data.

Or if the barcode scanner manufacturer provides an SDK to interact
with it through another API (not the keyboard) then you can use that
directly (although it ties you to a particular brand).

HTH,

Sam
------------------------------------------------------------
We're hiring! B-Line Medical is seeking Mid/Sr. .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.

On Wed, 31 Jan 2007 22:03:52 -0000, "Jay" <-wrote:
>I have a barcode scanner with a USB interface. It acts as a keyboard (ie if I scan a barcode, it is
placed at the text cursor as if I'd typed it on the keyboard).

I'd like to bypass this behaviour so barcodes don't go to the text cursor, but instead go into my C#
programme, even if it doesn't have focus.

How do I do this? I somehow need to re-asign its output to my C# programme.
Feb 1 '07 #2

P: n/a
Jay
Thanks for your help Samuel,

Isn't there any way to "talk" directly to a USB device, in the same way that you can talk to a
serial-port device. I assumed that since USB is a fairly recent and current standard, there would be
plenty of OS API support for it.

Jay

"Samuel R. Neff" <sa********@nomail.comwrote in message
news:71********************************@4ax.com...

Two possibilities. If the barcode scanner is configurable to the
point where you can prepend any barcodes with a keystroke like
windows-b then you can set up a global hook to listen for this
keystroke and then presumably read the rest of the data.

Or if the barcode scanner manufacturer provides an SDK to interact
with it through another API (not the keyboard) then you can use that
directly (although it ties you to a particular brand).

HTH,

Sam
------------------------------------------------------------
We're hiring! B-Line Medical is seeking Mid/Sr. .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.

On Wed, 31 Jan 2007 22:03:52 -0000, "Jay" <-wrote:
>I have a barcode scanner with a USB interface. It acts as a keyboard (ie if I scan a barcode, it is
placed at the text cursor as if I'd typed it on the keyboard).

I'd like to bypass this behaviour so barcodes don't go to the text cursor, but instead go into my
C#
programme, even if it doesn't have focus.

How do I do this? I somehow need to re-asign its output to my C# programme.

Feb 2 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.