how can I capture the tabkey being pressed?

  • Thread starter Thread starter jamie
  • Start date Start date
J

jamie

On my device I am writing for there are two tab keys, one to tab back one
to tab forward. The problem is I don't want tab to move me from the textbox
that is currently focused. I thought about capturing the tab key pressed
or key down event and focusing on the textbox again but the tab key fails to
register in either method. How can I stop tab from moving the focus?
 
Well, you could stop Tab from ever reaching the form. You could use
ApplicationEx and an IMessageFilter subclass, see OpenNETCF.Org for the
Smart Device Framework, and look for all WM_KEYDOWN (I think that's the
right one to look for), events where the virtual key code is VK_TAB. When
you see one of those, simply ignore it. Otherwise, allow it to processed by
the application.

Paul T.
 
Back
Top