Form KeyPress Event:
The following code shows you form keypress event, whatever you press key on form it shows you message that particular key is pressed.
Code
private void Form1_KeyPress(object sender, KeyPressEventArgs e)
{
MessageBox.Show("You Pressed : " + e.KeyChar.ToString());
}
0 comments:
Post a Comment