C#:按ESC就退出

设置窗体属性KeyPreview=True。 private void Form1_KeyUp(object sender, KeyEventArgs e) { if (e.KeyData == Keys.Escape)Application.Exit(); } 来自:http://zhidao.baidu.com/question/17393332.html 转载于:https://www.
相关文章
相关标签/搜索