J
jp2msft
I've got an application that takes input from a handheld scanner: Once the
incoming text meets the RegEx format and is the correct length, the command
is accepted.
The scanner that plugs in on the keyboard port.
The problem comes from the use of the default MessageBox whenever I need to
display information to the operator:
DialogResult dr =
MessageBox.Show("Do this?", Title,
MessageBoxButtons.YesNo,
MessageBoxIcon.Question,
DefaultButton.Button1);
Sometimes, these scanners send in more data (usually blank spaces) after a
MessageBox is displayed, and (as some of you may know) the space bar can be
used to select the default button.
I would like to flush the scanner's buffer, effectively flushing the
keyboard buffer? Are p/invoke calls needed for this, or is there something in
the Framework?
I'm running 2.0 Framework with Visual Studio 2005 - but I'll take tips and
how-to info from just about anything.
Thanks,
~Joe
incoming text meets the RegEx format and is the correct length, the command
is accepted.
The scanner that plugs in on the keyboard port.
The problem comes from the use of the default MessageBox whenever I need to
display information to the operator:
DialogResult dr =
MessageBox.Show("Do this?", Title,
MessageBoxButtons.YesNo,
MessageBoxIcon.Question,
DefaultButton.Button1);
Sometimes, these scanners send in more data (usually blank spaces) after a
MessageBox is displayed, and (as some of you may know) the space bar can be
used to select the default button.
I would like to flush the scanner's buffer, effectively flushing the
keyboard buffer? Are p/invoke calls needed for this, or is there something in
the Framework?
I'm running 2.0 Framework with Visual Studio 2005 - but I'll take tips and
how-to info from just about anything.
Thanks,
~Joe