KeyDown事件,重点preSS事件和KeyUp事件在Visual Studio中的区别 [英] Difference between the KeyDown Event, KeyPress Event and KeyUp Event in Visual Studio

查看:159
本文介绍了KeyDown事件,重点preSS事件和KeyUp事件在Visual Studio中的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能告诉我在的KeyDown 事件之间的差别,在键preSS 事件和的KeyUp 事件?我查MSDN网站,它并没有太多的解释。

Can anyone tell me the difference between the KeyDown event, the KeyPress event and the KeyUp event? I checked the msdn site and it does not explain it much.

谁能告诉我简单的逻辑意义当每个事件发生?我觉得当一个关键是pssed $ P $出现上述所有事件。那么它们之间有什么确切的差别。

Can anyone tell me in simple logical sense when each of the event occurs? I feel that all the above event occurs when a key is pressed. So what is the exact difference between them.

推荐答案


  • 的KeyDown:当人presses一个键(在键盘首先检测上的一个键一个手指,出现这种情况的时候,关键是pressed下)发​​生

  • KeyDown: happens when the person presses a key (when the keyboard first detects a finger on a key, this happens when the key is pressed down).

    重点preSS:当一个关键是pressed,然后释放发生

    KeyPress: happens when a key is pressed and then released.

    的KeyUp:关键是释放时发生

    KeyUp: happens when the key is released

    您是对的,当一个关键是pssed $ P $,然后释放,在我上述顺序所有这些事件发生。

    You are right that all of these events occur when a key is pressed and then released, in the order I described above.

    这篇关于KeyDown事件,重点preSS事件和KeyUp事件在Visual Studio中的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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