本文介绍了如何捕捉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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!