SyntaxFix
Write A Post
Hire A Developer
Questions
If you have a cancel button on your form, you can set the Form.CancelButton property to that button and then pressing escape will effectively 'click the button'.
If you don't have such a button, check out the Form.KeyPreview property.