I did a search on this site and all results said to use Thread.Suspend. Now in vs2005 Thread.Suspend is deprecated/obsolete. I checked MSDN and it said that the method will be removed from the next version. Is there a different way to pause a thread?
I have tried to use sleep in a sub like this:
But, t.Sleep is underlined green. When I check the tooltip it says, Access of a shared member ... qualifying expression will not be evaluated.Code:Sub SuspendThread(ByVal t As Threading.Thread) While bPaused t.Sleep(100) End While End Sub
I shortened the message. It wants me to convert t.Sleep to Thread.Sleep. This seems like it may cause the wrong thread to sleep on accident.
Any ideas?




Reply With Quote