表单的按键事件 [英] Key Press Event Of a Form

查看:136
本文介绍了表单的按键事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只要在窗体或文本框或组合框之类的任何控件上按下任何键,就会触发窗体按下事件.
现在,假设我在文本"框中按下了键...那么,如果我有Form的按下事件,我该在Forms按下事件中按下哪个控制键吗?

Whenever any key is pressed on form or on any control like text box or combo box..forms Key press event is fired.
Now Suppose i press key inside the Text box...then if i have key press event of form shall i get on which control key is pressed inside Forms key press event?

推荐答案

是的,该事件具有sender属性,这是发送该事件的控件.也许您应该购买一本基本的Winforms书籍并阅读,或者阅读一些在线教程以帮助您了解这些基础知识?
Yes, the event has a sender property, which is the control that sent it. Perhaps you should buy a basic Winforms book and read it, or read some online tutorials to help you with these sort of basics ?


这篇关于表单的按键事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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