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

Barcode Reader Plugged in Keyboard

P: n/a
hello everyone, i have a question about retrieving data from a bar code
reader plugged in keyboard port (ps/2)
i really dont know how to retrieve data from keyboard, i tried some methods
but all i could get was getting key values like "F7 key", or "Shift key"...
can someone tell me how to retrieve data from a bar code scanner please? or
at least how to retrieve data from ps/2 keyboard... maybe a handle or so...
thanx for reading this post and thanx so MUCH for helping.. have a nice day.
Dec 11 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a

AFAIK, your data is in clipboard (after reader have read data), just get
them outta here

S> hello everyone, i have a question about retrieving data from a bar
S> code
S> reader plugged in keyboard port (ps/2)
S> i really dont know how to retrieve data from keyboard, i tried some
S> methods
S> but all i could get was getting key values like "F7 key", or "Shift
S> key"...
S> can someone tell me how to retrieve data from a bar code scanner
S> please? or
S> at least how to retrieve data from ps/2 keyboard... maybe a handle or
S> so...
S> thanx for reading this post and thanx so MUCH for helping.. have a
S> nice day.
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/members/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Dec 12 '05 #2

P: n/a
i will try that but i dot think so....

'cuz when i read a code from the scanner, as far as i see it invokes the
keypress events..., i wrote a program which listens keypress events and i
see that it presses some buttons depends on the code..
buttons like F7, Esc, Enter.... i tink thats because the operating system or
the keypress event doesnt know how to handle data sent from the scanner... i
need to write a new keypress event handler.. thanx for helping anyway..

"Michael Nemtsev" <ne*****@msn.com> wrote in message
news:9c**************************@msnews.microsoft .com...

AFAIK, your data is in clipboard (after reader have read data), just get
them outta here

S> hello everyone, i have a question about retrieving data from a bar
S> code
S> reader plugged in keyboard port (ps/2)
S> i really dont know how to retrieve data from keyboard, i tried some
S> methods
S> but all i could get was getting key values like "F7 key", or "Shift
S> key"...
S> can someone tell me how to retrieve data from a bar code scanner
S> please? or
S> at least how to retrieve data from ps/2 keyboard... maybe a handle or
S> so...
S> thanx for reading this post and thanx so MUCH for helping.. have a
S> nice day.
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/members/laflour

"At times one remains faithful to a cause only because its opponents do
not cease to be insipid." (c) Friedrich Nietzsche

Dec 12 '05 #3

P: n/a
Hi,

I haven;t used a scanner in the desktop, only in the PPC but all the
scanners I have seen brings their own SDK , what kind of scanner r u using?

check the manufacturer website

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Serdar C." <serdarc@(dont write this part)interaktif.gen.tr> wrote in
message news:%2***************@tk2msftngp13.phx.gbl...
hello everyone, i have a question about retrieving data from a bar code
reader plugged in keyboard port (ps/2)
i really dont know how to retrieve data from keyboard, i tried some
methods but all i could get was getting key values like "F7 key", or
"Shift key"... can someone tell me how to retrieve data from a bar code
scanner please? or at least how to retrieve data from ps/2 keyboard...
maybe a handle or so... thanx for reading this post and thanx so MUCH for
helping.. have a nice day.

Dec 12 '05 #4

P: n/a

"Serdar C." <serdarc@(dont write this part)interaktif.gen.tr> wrote in
message news:%2***************@tk2msftngp13.phx.gbl...
hello everyone, i have a question about retrieving data from a bar code
reader plugged in keyboard port (ps/2)
i really dont know how to retrieve data from keyboard, i tried some
methods but all i could get was getting key values like "F7 key", or
"Shift key"... can someone tell me how to retrieve data from a bar code
scanner please? or at least how to retrieve data from ps/2 keyboard...
maybe a handle or so... thanx for reading this post and thanx so MUCH for
helping.. have a nice day.


This was some time ago but one thing we did was established how many
characters were coming in from the barcode and placed a non-visible textbox
on the screen. On a valuechange check the length, if the barcode reader is
done then you can evaluate the entire string.

An other thing you may want to take into account is make sure once you
process your keystrokes you "throw them away" so the OS and framework don't
process them. Keys like ESC and F11 have special meanings sometimes and if
you let them continue the OS will get hold of them and do funny things.

IIRC returning "false" from the keystroke handler means they don't get
passed on. But then you have to make sure you are not trapping "real" keys
some body pressed.

Tom P.
Dec 12 '05 #5

P: n/a
zq
well, if you are using a PS/2 bar code reader, it emulates the keyboard.
it doesn't store the scanned code -- it acts as if you have typed it over
the keyboard.

all you can do actually is think of it as if an user is writing it down.
try these:
- create a text box and place a focus to it - everything scanned will be
written directly inside it
- on any control that supports keypress event (e.g. form) - write a handler
and analyze the
KeyPressEventArgs arguments that are passed to it

"Serdar C." <serdarc@(dont write this part)interaktif.gen.tr> wrote in
message news:%2***************@tk2msftngp13.phx.gbl...
hello everyone, i have a question about retrieving data from a bar code
reader plugged in keyboard port (ps/2)
i really dont know how to retrieve data from keyboard, i tried some
methods but all i could get was getting key values like "F7 key", or
"Shift key"... can someone tell me how to retrieve data from a bar code
scanner please? or at least how to retrieve data from ps/2 keyboard...
maybe a handle or so... thanx for reading this post and thanx so MUCH for
helping.. have a nice day.

Dec 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.