...
' This value is incremented by all threads.
Public Value As Integer = 0
Private Sub btnStartThread_Click(ByVal sender As _
System.Object, ByVal e As System.EventArgs) Handles _
btnStartThread.Click
' Make a new counter object.
Static thread_num As Integer = 0
Dim new_counter As New Counter(Me, thread_num)
thread_num += 1
' Make a thread to run the object's Run method.
Dim counter_thread As New Thread(AddressOf _
new_counter.Run)
' Make this a background thread so it automatically
' aborts when the main program stops.
counter_thread.IsBackground = True
' Start the thread.
counter_thread.Start()
End Sub
http://www.vb-helper.com/howto_net_run_threads.html



