N
Niksa Baldun
Hi,
I am trying to capture data from magnetic stripe reader which is connected
via keyboard interface (therefore indistinguishable from normal keyboard
input). Basically, I am doing the following (in the Form.Keypress event
handler):
strCardData &= e.KeyChar
e.Handled = True
As you can see, I capture the input from the reader, and then prevent the
active control from receiving keyboard data. However, some characters get
lost, that is KeyPress event is not fired for all "keystrokes". It appears
to be random, but every time at least one character is lost. I figured that
one of the controls on the form is causing this, but after I removed ALL the
controls the problem still persists.
However, if I display another form modally, the same procedure works like a
charm there.
Like I said, any ideas are welcome, since I cannot even imagine what could
prevent the triggering of KeyPress event. Alternatively, perhaps someone
could suggest a different method of capturing keyboard data.
Thanks,
Niksa
I am trying to capture data from magnetic stripe reader which is connected
via keyboard interface (therefore indistinguishable from normal keyboard
input). Basically, I am doing the following (in the Form.Keypress event
handler):
strCardData &= e.KeyChar
e.Handled = True
As you can see, I capture the input from the reader, and then prevent the
active control from receiving keyboard data. However, some characters get
lost, that is KeyPress event is not fired for all "keystrokes". It appears
to be random, but every time at least one character is lost. I figured that
one of the controls on the form is causing this, but after I removed ALL the
controls the problem still persists.
However, if I display another form modally, the same procedure works like a
charm there.
Like I said, any ideas are welcome, since I cannot even imagine what could
prevent the triggering of KeyPress event. Alternatively, perhaps someone
could suggest a different method of capturing keyboard data.
Thanks,
Niksa