PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Form.KeyPreview in CF
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Form.KeyPreview in CF
![]() |
Form.KeyPreview in CF |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hello!
First, I'm using VS2003 with .NET CF. I'm writing an application for PocketPC which uses bar code scanner. Scanner reads bar code data into application as if it were manually typed. On a form there are TextBox (into which bar code data is read) and ListBox. Problems begin when ListBox has focus, then data from scanner goes to nowhere. ListBox.KeyPress and other ListBox.Key* events don't work. First my solution was to call TextBox.Focus() after each ListBox.SelectedIndexChanged. But after, I saw that if ListBox is not fully filled with items then when I tap on an empty space of ListBox I didnt get ListBox.SelectedIndexChanged and TextBox lost focus. Form.KeyPreview property coulde solve the problem but .NET CF doesn't support it. How to preview keyboard events before any control get them? Or any solution of this problem if possible. Thank you for reading and for your help ! Aleks S |
|
|
|
#2 |
|
Guest
Posts: n/a
|
CF 2 or IMessageFilter. Discussed before:
http://groups.google.com/group/micr...d366ecbadab46a7 Cheers Daniel -- http://www.danielmoth.com/Blog/ <s_alexander04@list.ru> wrote in message news:1141576421.097591.13730@i40g2000cwc.googlegroups.com... > Hello! > First, I'm using VS2003 with .NET CF. > I'm writing an application for PocketPC which uses bar code scanner. > Scanner reads bar code data into application as if it were manually > typed. On a form there are TextBox (into which bar code data is read) > and ListBox. Problems begin when ListBox has focus, then data from > scanner goes to nowhere. ListBox.KeyPress and other ListBox.Key* events > don't work. First my solution was to call TextBox.Focus() after each > ListBox.SelectedIndexChanged. But after, I saw that if ListBox is not > fully filled with items then when I tap on an empty space of ListBox I > didnt get ListBox.SelectedIndexChanged and TextBox lost focus. > Form.KeyPreview property coulde solve the problem but .NET CF doesn't > support it. > How to preview keyboard events before any control get them? Or any > solution of this problem if possible. > > Thank you for reading and for your help ! > > > Aleks S > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Another thing that might help would be to 'turn-off' the scanner unless
the textbox does not have focus. What device is it? Chris |
|
|
|
#4 |
|
Guest
Posts: n/a
|
"Socket SDIO In-Hand Scan Card" scanner
or Opticon PHL5200 Pocket PC whith a built-in scanner. The scanner must always be turned on and ready to scan while the application is running. If you mean that user must manually set focus to the textbox in case it hasn't, no it won't do. The application must be simple and convenient for a user as much as possible. Aleks |
|
|
|
#5 |
|
Guest
Posts: n/a
|
Then it sounds like you should use the SDK and not the wedge.
Paul T. <s_alexander04@list.ru> wrote in message news:1141672687.554995.58990@p10g2000cwp.googlegroups.com... > "Socket SDIO In-Hand Scan Card" scanner > or Opticon PHL5200 Pocket PC whith a built-in scanner. > > The scanner must always be turned on and ready to scan while the > application is running. If you mean that user must manually set focus > to the textbox in case it hasn't, no it won't do. The application must > be simple and convenient for a user as much as possible. > > Aleks > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

