如何捕捉ESC键preSS用的WndProc? [英] How to catch ESC key press with WndProc?

查看:379
本文介绍了如何捕捉ESC键preSS用的WndProc?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用WndProc中捕获一个ESC键preSS?

How to catch an ESC KeyPress using WndProc?

推荐答案

你为什么做这种方式?为什么不是形式的 previewKey 属性设置为,并设置一个全局事件处理程序的KeyUp ,并检查它...

Why are you doing it this way? Why not set the PreviewKey property of the Form to true and set a global event handler for KeyUp and check it...


if (e.KeyCode == Keys.Esc){
   //...
}

这篇关于如何捕捉ESC键preSS用的WndProc?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆