Click here to Skip to main content
11,932,734 members (56,888 online)
Click here to Skip to main content
Alternatives (1)
Add your own
alternative version

Tagged as


15 bookmarked

Close Application at Press of Escape Button

, 10 Nov 2011 CPOL
How to close Form at pressing of Escape Button.


Members may post updates or alternatives to this current article in order to show different approaches or add new features.

1 Jul 2011
Your tip is useful for main forms with no close or cancel button. But most time you will want the "escape-close-form-behaviour" only with dialogs. This is the recommended way to do it: (Now i see Indivara already mentioned it in the comments)using System;using...


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer
India India
Microsoft Student Partner | CS Student | MCTS | CP MVP | Crazy Learner | Dreamer

An Indian, who loves his country, believes in freedom, He is an enthusiast Techie and crazy learner. He is passionate about Technologies and social media. He holds bachelor degree of CS in Information Technology and now pursuing Master degree in Computer Application.

He always excited and keen Interested in learning and sharing knowledge. He loves to write blog, learn new things, listen music, taking arts and Playing Games..

He keep himself on the desk of his imagination, hanging around with some inceptions.

| | Privacy | Terms of Use | Mobile
Web01 | 2.8.151126.1 | Last Updated 11 Nov 2011
Article Copyright 2011 by RaviRanjankr
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid