线程间操作无效:从不是创建控件“XX”的线程访问它。

解决方法:

在构造函数中加入如下代码:CheckForIllegalCrossThreadCalls = false;

这个不提倡大家使用,可以使用

this.BeginInvoke(new Action(() =>
{
    this.button1.Enabled = true;
}));

相关文章:

  • 2022-01-08
  • 2022-12-23
猜你喜欢
  • 2021-11-28
  • 2022-12-23
  • 2021-11-28
  • 2021-11-28
  • 2021-11-28
  • 2021-11-28
  • 2022-02-10
相关资源
相似解决方案