开发者

Handling Keyboard at Form level

I have a Form with several special controls on it that is the main window of my application. I would like to capture all key presses while my application is running, at the form level, rather than 开发者_高级运维on the focused control or anything like that. What is the standard way to do this in WinForms?


set Form.PreviewKeys = true, then you get all keyboard event.


Set the Form's KeyPreview property to true and then handle one of the keypress events.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜