Hello,
I need to handle some key press events in a C# windows application. I thought I can use this:
But it didn't work! It should output a hello whenever I press a key but it doesn't do anything!
Can anyone help me please?
I need to handle some key press events in a C# windows application. I thought I can use this:
Code:
[size=2][/size][size=2][color=#0000ff]private[/color][/size][size=2] [/size][size=2][color=#0000ff]void[/color][/size][size=2] MainForm_KeyPress([/size][size=2][color=#0000ff]object[/color][/size][size=2] sender, System.Windows.Forms.KeyPressEventArgs e)
{
MessageBox.Show("Hello!");
}
[/size]
But it didn't work! It should output a hello whenever I press a key but it doesn't do anything!
Can anyone help me please?