1
Answer

Key Event does not work on simple form...

Mirza Hatipovic

Mirza Hatipovic

17y
2.2k
1
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)