Link to home
Start Free TrialLog in
Avatar of ukalyan
ukalyan

asked on

Handling KeyPress events in CF 2.0

Hi I have created a CF2.0 form with a picture box and running on a mobile device running WinCE 6.0 with USB keyboard connected.
I have to change the pictures in the "pictureBox" using keyboard keys. I have handled the "KeyPress" event for the form. But if I press any key on the keyboard, it is not generating any "event" in the form.

Any Ideas?
Thanks for your help.
//Defintion
this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.Form1_KeyPress);
 
//Event Handler
 private void Form1_KeyPress(object sender, KeyPressEventArgs e)
        {
            MessageBox.Show("KeyPress");
        }

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial