Write to RichTextBox from thread

  • Thread starter Thread starter Dmitri Shvetsov
  • Start date Start date
D

Dmitri Shvetsov

Hi,

Does anybody know how to write to richTextBox from thread?

All variables using by thread should be static, including the thread method
(body). The richTextBox control is used on a main form and I have no chance
to make it static. VS refuses to use this control to place a text there
(like a log from thread). How can I do that? Any possible way and/or control
to use it on the form and to write some text from the static method (thread)
would be appreciated.

Thanks,
Dmitri
 
If you don't care about being thread-safe you can set the properties of the textbox and form not to check for cross thread calls
Code:
RichTextBox1.CheckForIllegalCrossThreadCalls = False
 
Back
Top