BackgroundWorker - Cross-thread operation not valid

前端 未结 7 1066
南方客
南方客 2020-12-14 19:16

I have a winform application (one form), on this form there is a RichTextBox. In the constructor of this form I create an instance of the class MyClass. In the

相关标签:
7条回答
  • 2020-12-14 19:50

    You can also try this.

    this.Invoke(new MethodInvoker(delegate()
    {
        richtextBox.Text.Add("MyText");
    }));
    
    0 讨论(0)
提交回复
热议问题