110,561
社区成员
发帖
与我相关
我的任务
分享
this.textBox1.Location = new System.Drawing.Point(161, 65);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(112, 21);
this.textBox1.TabIndex = 10;
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
this.textBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox1_KeyDown);
private void textBox1_KeyDown(object sender, EventArgs e)
{
MessageBox.Show("输入有误,请核对后重新输入");
}
public Form1()
{
InitializeComponent();
textBox1.TextChanged += new EventHandler(textBox1_TextChanged);
textBox1.KeyDown+=new KeyEventHandler(textBox1_KeyDown);
}
private void textBox1_KeyDown(object sender, KeyEventArgs e)
{
MessageBox.Show("输入有误,请核对后重新输入");
}
void textBox1_TextChanged(object sender, EventArgs e)
{
}