按键事件不起作用 [英] keypress event not working
本文介绍了按键事件不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
MessageBox.Show("hello");
}
我使用上面的代码在消息框中显示了问候.,但是它不起作用
i used above code to show hello in message box.,but its not working
推荐答案
嗨朋友
试试这样的东西,
textBox1->属性->尝试查找(事件选项)->然后选择按键选项
最终将您的代码放入keypress函数中,然后执行它...
问候
sarva
hi friend
try something like this,
textBox1->properties->try to find (Events option)->then select keypress option
eventually put your code within keypress function, then execute it...
regards
sarva
http://www.daniweb.com/software-development/vbnet/threads/114278/textbox-key-press-event [
这篇关于按键事件不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文