enable timer from thread

SIMIN

Regular
Joined
Mar 10, 2008
Messages
92
Hi,
I start a new thread this way:

Dim Threads As New Thread(New ParameterizedThreadStart(AddressOf ConnectThread))
Threads.Start()

However, from within this thread, I enable a timer, but the problem is that when this thread finish, timer is disposed as well.
How can I enable a timer from a thread, is it impossible?
Please help me.
Thanks.
 
No, it's a thread problem, I simply put a timer from Toolbox / Components.
I think you didn't work with threads so much! :D
 
You could have been clearer about which Kinf of Timer you were using...

If you are using the timer component from the toolbox then there is a strong probability that you are suffering from a cross thread / UI issue. You might want to .Invoke a method from the form itself to start the timer or investigate using one of the other timer objects (e.g. System.Threading.Timer).
 
Back
Top