Key Event does not work on simple form...

Aug 30 2007 1:33 AM
Hi,
I have this code in my form constructor:
this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.onKeyPress);

and below after the constructor I have this one:

private void onKeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
        {
            textBox1.Text = "uuuuu";
        }

and it does not work...

Why, it seems all ok in the code?

Regards,
Mirza

Answers (1)