Winform当达到一个文本框最大字符限制时立刻跳转到下一个文本框,如何实现 textbox.Appened("../n/r")不知道是不是这个形式,至于只能输入2位,那就判断一下顶一个! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在文本框的TextChanged事件中写代码,当输入完两位时,光标移开. private void textBox_TextChanged(object sender, EventArgs e) { if (textBox.Text.Length == 2) { 其他控件.Focus(); } } private void textBox1_TextChanged(object sender, EventArgs e) { if (this.textBox1.Text.Length == this.textBox1.MaxLength) this.textBox2.Focus(); } private void textBox1_TextChanged(object sender, EventArgs e) { if (this.textBox1.Text.ToCharArray().Length == this.textBox1.MaxLength) { this.textBox2.Focus(); } } private void textBox1_TextChanged(object sender, EventArgs e) {if (this.textBox1.Text.ToCharArray().Length == this.textBox1.MaxLength) { this.textBox2.Focus(); } } textchange事件吧,然后让textbox2获得焦点,输入的内容就会在textbox2中显示 至于只能输入1-30的数字用个正则限制下:rule = ^(([0-2]?[0-9]?)|([3]?[0]?))$good luck private void textBox1_TextChanged(object sender, EventArgs e) { TextBox text = (TextBox)sender; if (text.Text.Length == 2) { TextBox text2 =new TextBox (); text2 =(TextBox ) text.Parent .GetNextControl(text,true ); text2.Focus(); } }将textbox1-5的tab顺序设置为连续植。textbox1-4添加同一个事件textBox1_TextChanged 能把C/S和B/S分清楚的进来! 移动短信通开发,用C#怎么开发啊?用的是EMA_API.dll接口组件 不通过数据库,如何在本地完成对一系列数据的快速模糊查找? 程序运行后打开一个XML文件观看的问题 请教合并视频文件问题(在线等)。。。。 打印字符串的宽度计算问题 请大家提供几个winform的网站,国内或是国外均可!!! 请问有么有水晶报表的资料? datagrid的多部分显示 想通过数据库往dataGridView里填充数据 VS2005找不到GUID生成工具 C#更换桌面
private void textBox_TextChanged(object sender, EventArgs e)
{
if (textBox.Text.Length == 2)
{
其他控件.Focus();
}
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
if (this.textBox1.Text.Length == this.textBox1.MaxLength)
this.textBox2.Focus();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
if (this.textBox1.Text.ToCharArray().Length == this.textBox1.MaxLength)
{
this.textBox2.Focus();
}
}
{
if (this.textBox1.Text.ToCharArray().Length == this.textBox1.MaxLength)
{
this.textBox2.Focus();
}
}
textchange事件吧,然后让textbox2获得焦点,输入的内容就会在textbox2中显示
用个正则限制下:rule = ^(([0-2]?[0-9]?)|([3]?[0]?))$good luck
{
TextBox text = (TextBox)sender;
if (text.Text.Length == 2)
{
TextBox text2 =new TextBox ();
text2 =(TextBox ) text.Parent .GetNextControl(text,true );
text2.Focus();
}
}将textbox1-5的tab顺序设置为连续植。
textbox1-4添加同一个事件textBox1_TextChanged