求助 各位 朋友(谢谢)
using System;using System.Collections.Generic;
using
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication4 {
public partial class Form3 : Form {
public Form3() {
InitializeComponent();
}
private void textBox1_Validating(object sender, CancelEventArgs e) {
if (this.textBox1.Text == "")
this.errorProvider1.SetError(this.textBox1, "输入第1个");//指定在那个空间旁边显示提示
else
this.errorProvider1.SetError(this.textBox1, null);//清除掉此控件旁边的提示
}
private void textBox2_Validating(object sender, CancelEventArgs e) {
if (this.textBox2.Text == "")
this.errorProvider1.SetError(this.textBox2, "输入第2个");
else
this.errorProvider1.SetError(this.textBox2, null);
}
}
}
我不看懂 这具体的要求,运行不通。。。。。。。。。谢谢了