Quote Originally Posted by The trick View Post
You have a bug with marshaling. You can't just access to an object from an arbitrary thread. You should use marshaling always to avoid the bugs in future. The behavior of your code is explained by the fact that you call Form1.Text2.Text = "Thread 1: " & CStr(GetCurrentThreadId()) & vbNewLine and Form1.Text3.Text = "Thread 2: " & CStr(GetCurrentThreadId()) & vbNewLine which just call SetWindowText that calls SendMessage WM_SETTEXT. SendMessage waits until the window process the message in main thread.
Thanks for your anwer.
I tried with
MultiThreading.EnablePrivateMarshaling True
but no change.
What do I have to change in my example code? I don't know mashalling in VB6.

So, if do not do GUI stuff it should work.