how to stop cursor keys from activating radio buttons?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • colin

    how to stop cursor keys from activating radio buttons?

    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

    #2
    Re: how to stop cursor keys from activating radio buttons?

    "colin" <colin.rowe1@nt world.NOSPAM.co mwrote:
    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.


    Comment

    • colin

      #3
      Re: how to stop cursor keys from activating radio buttons?


      "Paul E Collins" <find_my_real_a ddress@CL4.orgw rote in message
      news:jfydneg22q Bp7WraRVnytAA@b t.com...
      "colin" <colin.rowe1@nt world.NOSPAM.co mwrote:
      >
      >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 =^.^=


      Comment

      Working...