BackgroundWorker - Cross-thread operation not valid

前端 未结 7 1100
南方客
南方客 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:43

    i think the error stops on this line:

    richtextBox.Text.Add("MyText");
    

    your question i similar to this:

    BackgroundWorker OnWorkCompleted throws cross-thread exception

提交回复
热议问题