keyboard input

Mar 18 2012 12:54 AM
I have tried everything to get this code to work but to no avail,please help
here is the code
private void Form1_KeyPress(object sender, KeyPressEventArgs e)

{

if (e.KeyChar == 'a')

{

Application.Exit();

e.Handled =

}

}



true;

Answers (4)