+92 332 4229 857 99ProjectIdeas@Gmail.com

Form KeyPress Event (C#.net)


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: