how to stop cursor keys from activating radio buttons?

  • Thread starter Thread starter colin
  • Start date Start date
C

colin

Hi,
I have a form with some buttons and a graphical user control,
I need to use the cursor keys to move the camera position
in the control, but it has the unfortunate side effect of
cycling through the button controls on the form and changing
the state of the radio buttons, wich is catastrophic.

how can i stop this?
ive tried setting tabstop to false and handling the keyup/down/press events
in the form and user control
and setting handled/supres to true but its still doing it.

any ideas?
must be something simple somewhere im missing im sure ...

Colin =^.^=
 
Paul E Collins said:
colin said:
I have a form with some buttons and a graphical user control, I need to
use the cursor keys to move the camera position in the control, but it
has the unfortunate side effect of cycling through the button controls on
the form [...]

If you set Form.KeyPreview to true, the form gets all keystrokes before
any individual control does, so you can handle (and cancel) any special
key events that should take priority over the normal behaviour.

thanks seems its not suficient to handle the OnKey events,
but the ProcessCmdKey handler too wich handles the cursor/menu keys etc
before.

COlin =^.^=
 
Back
Top