I dont know why the thread.sleep is static.If i want to sleep a particular thred how can i do??
May be there is something in delegate function
Printable View
I dont know why the thread.sleep is static.If i want to sleep a particular thred how can i do??
May be there is something in delegate function
It seems you didn't start the second thread after you set interval . Here is a quick exmple how to do it :
VB Code:
Dim thread1 As Threading.Thread Dim thread2 As Threading.Thread Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load thread1 = New Threading.Thread(AddressOf threadPro1) thread2 = New Threading.Thread(AddressOf threadPro2) thread1.Start() thread2.Sleep(50000) thread2.Start() End Sub Private Sub threadPro1() MessageBox.Show("Thread1 fired") End Sub Private Sub threadPro2() MessageBox.Show("Thread2 fired") End Sub