Hi Mojo,
Based on my researching, I wants to confirm with you that
1. WinForm controls are not thread-safe, that is to say, you can not use
the controls in another thread if you create the controls in the Main
Thread.
If you wants to call the RichTextBox in the Main UI thread, you may need to
use the marshal the call back using Invoke or BegineInvoke.
Visual C# Windows Form Asynchronous Example
http://www.dotnetfun.com/Examples/WindowsForms/AsynchronousExample.aspx
2. Also there is more going on than just messages (API calls, etc) within
Windows Forms so you can't rely on Windows doing the marshalling. You can
have a separate form on a separate thread, but each thread needs to have
it's own message pump, etc.
Multithreaded Windows Forms Control Sample
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconDevelopingMultithreadedWindowsFormsControl.asp
If you have concern on this issue ,please post here.
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.