c#question我的firsttextvaue已经填满1000,如果我想做第二个文本框值不大于第一个文本值。 [英] c# question my firsttextvaue already fill 1000 and if i want to do second textbox value is not greater than first text value.
本文介绍了c#question我的firsttextvaue已经填满1000,如果我想做第二个文本框值不大于第一个文本值。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请在C#中编写代码,如果我管理文本框属性
Write the code in C# please if i manage the textbox property
推荐答案
为此你应该Comapre的值为textBox2
在textBox2_textChanged()
事件
textBox1
/>
ex。
Hi,
For this you should Comapre the value oftextBox2
withtextBox1
in thetextBox2_textChanged()
event
ex.
textBox2_textChanged(Object sender, Eventargs e)
{
int a=int.parse(textBox1.text);
if (textBox1.Text > a)
{
MessageBox.Show("You cannot enter value greater than {0}", a);
}
}
谢谢。
Thanks.
这篇关于c#question我的firsttextvaue已经填满1000,如果我想做第二个文本框值不大于第一个文本值。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文