Hi,
I'm very much a newbie when it comes to programming, hopefully someone can help me out here please
I have created an application which uses threading and processes my problem is I use the thread.waitfor method before my application can proceed with the next part of the coding but my problem is that my application freezes until the thread.waitfor has completed.
Now what happens is my application just freezes until it reaches .set, hopefully someone can help me.
I'm very much a newbie when it comes to programming, hopefully someone can help me out here please
VB.NET:
Public Class Form1
Private Shared ResetE As New AutoResetEvent(False)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
startthread()
ResetE.WaitOne()
' then my next bit of coding
End Sub
Public Sub startthread()
Dim processThread As New Threading.Thread(AddressOf StartProcess)
processThread.IsBackground = True
processThread.Start()
End Sub
Public Sub StartProcess()
'Open Process coding
ResetE.Set()
'Close process coding
End Sub
Now what happens is my application just freezes until it reaches .set, hopefully someone can help me.
Last edited: