http://zhidao.baidu.com/link?url=iTSyfa5_RJBSb37S8efdWoL5eDMrnxeAm-prhGSNBXqdP9r7PzNDQTc7gVzJgCNdzliVAqbr9M3ChiZUDmT98_

你应该是在加载窗体时为文本框赋值了。
你可以:
1.把绑定事件的代码放到赋值之后
public Form1()
{
InitializeComponent();

textBox1.Text = "123";
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);//同时去掉InitializeComponent中的绑定代码
}
2.添加一个标记标量用于标识是不是正在加载数据:
private bool m_IsLoading = false;
public Form1()
{
InitializeComponent();

m_IsLoading = true;
textBox1.Text = "123";
m_IsLoading = false;

}

private void textBox1_TextChanged(object sender, EventArgs e)
{
if (!m_IsLoading)
{
MessageBox.Show("123");
}
}

相关文章:

  • 2021-05-11
  • 2022-01-22
  • 2021-07-09
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2021-05-25
猜你喜欢
  • 2021-12-16
  • 2021-06-21
  • 2021-12-01
  • 2021-12-09
  • 2022-12-23
  • 2021-11-19
  • 2022-02-05
相关资源
相似解决方案