This article has been dead for over three months
You
'Simulated loop that will continue for ever,
'Kinda like a persistant thread that will not stop
Private Sub BackgroundProcess()
Dim i As Integer = 1
Do While True
ListBox1.Items.Add("Iterations: " + i)
i += 1
Loop
End Sub
'Thread created to handle the Background process
Dim t As Thread
t = New Thread(AddressOf Me.BackgroundProcess)
t.Start()
'add a button to the form to handle the "e-Brake" to the thread
Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button2.Click
t.Abort()
End Sub