By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,934 Members | 1,692 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,934 IT Pros & Developers. It's quick & easy.

how to stop cursor keys from activating radio buttons?

P: n/a
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 =^.^=
Apr 5 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"colin" <co*********@ntworld.NOSPAM.comwrote:
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.

Eq.
Apr 5 '08 #2

P: n/a

"Paul E Collins" <fi******************@CL4.orgwrote in message
news:jf*********************@bt.com...
"colin" <co*********@ntworld.NOSPAM.comwrote:
>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 =^.^=
Apr 5 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.