18-06-21, 07:15 PM
1- In the Form Properties Set KeyPreview = True
2- In the Form KeyDown - Write the below code
If e.KeyCode = Keys.Escape Then
Me.Close
Exit Sub
End If
2- In the Form KeyDown - Write the below code
If e.KeyCode = Keys.Escape Then
Me.Close
Exit Sub
End If
