使文本框成为要查找的目录。 [英] Making a text-box a directory to be looked in for.
问题描述
举个例子我有两个文本框,其中一个我把数字放在1到100之间,另一个如果我把任何东西放在1-100之间,它应该说Found,如果我把任何不在列表中的东西,应该说找不到。 PS:使用Visual Studio 2008.
谢谢!!!!
我有什么尝试过:
我已经制作了结构,但是我还没有做任何编码,因为我是新手,并且不太理解
so as an example I have two textboxes, in one I put the numbers like 1 to 100 and in the other one if I put anything between 1-100, it should say Found, if I put anything that's not on the list, it should say NOT FOUND. PS: using Visual Studio 2008.
Thanks!!!!
What I have tried:
I have made the structure but still have not done any coding since I m new to this and do not understand it that well
推荐答案
in .net
使用Textbox.Text属性
代码部分
in .net
use Textbox.Text property
Code part
If Textbox2.Text = Textbox1.Text Then
Msgbox ("Found")
Else
Msgbox ("Not Found")
End If
您可以将此代码用于按钮单击事件或文本框Textchanged事件
这是另一个问题,Textbox1.Text可以是Textbox2.Text的子串
You can use this code with Button Click Event or Textbox Textchanged Event
Here is one another issue that Textbox1.Text can be substring of Textbox2.Text
这篇关于使文本框成为要查找的目录。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!