keys.enter事件的问题 [英] problem with keys.enter events
本文介绍了keys.enter事件的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有漂亮的问题。
当按下输入时,此代码循环播放。
I have beautifull problem.
this code is loop when press enter.
private void txtshowpagenumber_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
if ( textbox1.text=="ahmad")
messagebox.show("page not found !");
}
}
我在textbox1.text中输入ahmad。
找不到展示页面时!然后按E <小> <小> <小> 小> 小> 小>再次显示页面未找到! (是循环)?
I enter the ahmad in textbox1.text.
when show page not found ! and I press Enter again show page not found ! (is loop)?
推荐答案
找不到您的页面与检查回车键无关。
找不到页面是检查CurrentPageIndex的else
。它可能是0或-1 ?????????? (如果遇到问题,可能是Int32.Parse的错误代码)。
http://msdn.microsoft.com/en-us/library/b3h1hf19(v=vs.80).aspx [ ^ ]
Your page not found has nothing to do with checking the "enter" key.
Page not found is theelse
of checking the CurrentPageIndex. Is it maybe 0 or -1 ????????? (That could be the error code of Int32.Parse if having problems).
http://msdn.microsoft.com/en-us/library/b3h1hf19(v=vs.80).aspx[^]
这篇关于keys.enter事件的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文