I have a small form, which comes up when I press a button in a Windows Forms application.
I want to be able to close the form by pressing the escape key. How could I do t
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.