Click here to Skip to main content
15,888,984 members
Articles / Programming Languages / C#

Close Application at Press of Escape Button

Rate me:
Please Sign up or sign in to vote.
4.83/5 (4 votes)
1 Jul 2011CPOL 10.7K   1  
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...

Views

Daily Counts

License

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


Written By
Austria Austria
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions