用户在按键事件中的多个按键 [英] user multiple key in keypress event

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

问题描述

嗨 如何在按键事件中使用多个按键?例如,如何在文本框的按键中使用(ctrl + del)???????

解决方案

KeyDown

 如果(例如,Control& e.KeyCode == Keys.Delete){
    // 在此处编码
} 


KeyDown [ ^ ]事件,例如如果按下控件.请参阅文档中的示例.


hi how can i use multiple key in key press event? for example how can i use (ctrl + del) in the keypress of a textbox???????

解决方案

Use this in KeyDown

if (e.Control & e.KeyCode == Keys.Delete) {
    //code here
}


In KeyDown[^] event you can register if for example control is pressed. See the example in the documentation.


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

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