STEP 1
First Set KeyPreview Property True in Form
STEP 2
Now Create One Keydown event of Form
STEP 3
Write Below Code in Keydown Event
if (e.KeyCode == Keys.Escape)
{
this.Close();
}
First Set KeyPreview Property True in Form
STEP 2
Now Create One Keydown event of Form
STEP 3
Write Below Code in Keydown Event
if (e.KeyCode == Keys.Escape)
{
this.Close();
}
No comments :
Post a Comment