Key Preview in WinCe

P

Pinkesh Jain

Hi,

I wanted to know whether there is any equivalent for the
KeyPreview property (present in normal Windows Forms),
in .NET Compact Framework (on WinCe).

Basically I want to trap the TAB key. I'm able to do this
when the focus is on the Form (using the KeyPress event).
But when the focus is on a TextBox, then I'm not able to
capture the TAB event. As a result I wanted to implement
something equivalent to what "KeyPreview" property does.
(I mean making all the Keyboard events go to the Form
first, and then the Controls)
How can this be achieved?
Any pointers to the same?

Thanks.
 
K

Katie Schaeffer [MSFT]

Hi,

This is one of our top feature requests, but unfortunately we didn't get it
in for v1.0. There's not really a good workaround for this. (Key events
should be supported on textboxes though - try the KeyDown event for
non-character keys, and keep in mind there is a known issue with the
emulators and TAB keys).

-Katie

--------------------
| Content-Class: urn:content-classes:message
| From: "Pinkesh Jain" <[email protected]>
| Sender: "Pinkesh Jain" <[email protected]>
| Subject: Key Preview in WinCe
| Date: Tue, 28 Oct 2003 08:04:21 -0800
| Lines: 21
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOdbSZkEBUR3kC9Tuyh6KTjlGcLbA==
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:37039
| NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
|
| Hi,
|
| I wanted to know whether there is any equivalent for the
| KeyPreview property (present in normal Windows Forms),
| in .NET Compact Framework (on WinCe).
|
| Basically I want to trap the TAB key. I'm able to do this
| when the focus is on the Form (using the KeyPress event).
| But when the focus is on a TextBox, then I'm not able to
| capture the TAB event. As a result I wanted to implement
| something equivalent to what "KeyPreview" property does.
| (I mean making all the Keyboard events go to the Form
| first, and then the Controls)
| How can this be achieved?
| Any pointers to the same?
|
| Thanks.
|
|
|
|

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top