IsInputKey

W

woodBeeProgrammer

Thanks to vJ (Vijaye Raji) for pointing out IsInputKey to me. However i
admit i'm still confused about how to use it!! The scenario is i have a
form on which there is are some groupboxes with radiobuttons etc. In my
naivete thought "ok, set KeyPreview=true" and i can then handle all the keys
at the level of the form.

Not so fast, cowboy. Navigation keys like Keys.Right are swallowed whole--
my nice Form.KeyDown event handler waits patiently but never gets called.
Form.IsInputKey never gets called.

So following vJ's suggestion, i CAN override IsInputKey for each button on
each groupbox on the form, this works, but how to use this technique in
practice? Do i have to define ButtonEx and RadioButtonEx and subclass every
control that could be navigated to?

What's the right approach to this? Perhaps what i'm doing is simply wrong,
it breaks the standard ui using tabs and arrows to navigate between controls
and i should just rethink that, but is there any reasonable way to have
MainForm just handle them?

Thanks all in advance.
 
Top