Thread

daok

Newcomer
Joined
Aug 31, 2003
Messages
17
I have a thread but the problem is that when I minimize the windows the program doesn't want to come back in normal mode. It looks like that the thread doesn't give the time to the program to come back... I have put Application.DoEvents in the Thread Loop but that doesnt help...

What should I do?

Thx
 
Am I the only one who have tryed to use Thread overhere? If you have coded something with thread maybe you could just show me your syntax, maybe I am doing something wrong.
 
Code:
        'BUTTON TO START TH THREAD
        t = New Threading.Thread(AddressOf Proc_Now)
        t.Start()


Code:
Private Sub Proc_Now()
While (t.IsAlive)
            Application.DoEvents()
                t.Sleep(3000)
             'ACTIONS ARE HERE
            End If
        End While
End Sub

Code:
                'BUTTON TO STOP THE THREAD
                t.Suspend()
                t = Nothing
 
Hey daok,

I don't claim to be an expert on threading at all, but it was the first thing I played with when I got my copy of VS.NET a couple of months ago. I posted a tutorial that maybe will help you?

Strips it back to basics anyway

:D
 
Back
Top