locked
Windows Mobile Classic - Custom Control - Problem using keyboard to move between controls RRS feed

  • Question

  • Hi,

    I'm modifying an existing code base which uses custom controls under Windows Mobile Professional (touch screen) to
    to also work with Windows Mobile Classic (qwerty keyboard).  I'm having trouble understanding how to wire three
    custom controls on a single form such that the up and down keys move between the three button like controls.  I need
    the top custom control to be initially highlighted.

    I tried soing something like:

    this.CustomButton.KeyDown -= new System.Windows.Forms.KeyEventHandler(BKeyDn);
    this.CustomButton.KeyUp -= new System.Windows.Forms.KeyEventHandler(CustomButton_KUp);

    this.CustomButton2.KeyDown += new System.Windows.Forms.KeyEventHandler(BKeyDn);
    this.CustomButton2.KeyUp += new System.Windows.Forms.KeyEventHandler(CustomButton2_KUp);

    in the CustomButton_KUp event handler if the KeyEventArgs KeyCode was Keys.Down
    but that does not seem to be the right approach as no keyboard input is processed after
    this point.

    I'm looking for a general approach to follow with this type of issue.

    Thanks!

    • Moved by OmegaMan Monday, August 17, 2009 6:55 PM (From:Visual C# General)
    Monday, August 17, 2009 5:35 PM

Answers