How can 'Tab' pressed event be catched in CF?

G

Guest

I try to use KeyDown event of the form (or KeyDown event of the controls),
most of the key combinations (Alt+1, Alt+2, F1 etc.) works, but some
combination ( Tab, Alt+Tab, Shift+Alt+Tab) does not work, why?

Pleeeease help!

Thanks,

Frankie
 
C

Chris Tacke [MVP]

Because KeyDown isn't designed to catch those. Use an IMessageFilter.

-Chris
 
D

Daniel Moth

I have no problem catching tab (CF v2.0 in WM5.0 with Form.KeyPreview=true).

Are you saying that you tried a breakpoint on the } (or End Sub in VB) of
the KeyDown/KeyUp/KeyPress and those event handler method do not get entered
when you hit tab?

Cheers
Daniel
 
G

Guest

Thank you very much for your answer. I have switched Form.KeyPreview to
true, and now I can catch almost everything.

But what about catching Alt+Tab? I would like to catch myself, but always
starts the task manager if Alt+Tab is pressed

Frankie
 
D

Daniel Moth

It is supported by the SDF from OpenNETCF (which has a whole bunch of other
goodies too).

Cheers
Daniel
 
D

Daniel Moth

So you can catch everything except key sequences that have some meaning to
the platform, right? That is good.

I don't know off hand how to override the system ones... you probably have
to disable the process that is listening for those combinations (another one
is Ctrl+Esc)...

Cheers
Daniel
 
P

Paul G. Tobey [eMVP]

The shell catches Ctrl+Esc and Alt+Tab. It's not something that your own
application does anything with. You can disable the shell entirely, but
that has global effects and really only makes sense when you want to be the
only program that a user can access.

Paul T.
 
G

Guest

Hi All,
I am trying to catch device keys using c#. I want to catch Send(Green) and
End (Red) Keys .
How can i do that .?
Paul G. Tobey said:
The shell catches Ctrl+Esc and Alt+Tab. It's not something that your own
application does anything with. You can disable the shell entirely, but
that has global effects and really only makes sense when you want to be the
only program that a user can access.

Paul T.
 
P

Paul G. Tobey [eMVP]

Search the archives, but, as I recall, you can't. Since those are specific
to the phone functionality, I think that they are sent directly to the phone
application without passing through the input system.

Paul T.
 

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

Similar Threads


Top