请教:如何让线程多次执行
我在一个按钮事件中执行一个线程,第一次可以正常运行。运行完毕后再次点击按钮,程序没有反应,怎样可以让线程多次执行呢?Private th As System.Threading.Thread
Private Sub btnTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRecord.Click
If btnTest.Text = "测试" Then
btnTest.Text = "停止"
th = New System.Threading.Thread(AddressOf mydelegate)
th.Start()
Else
btnRecord.Text = "测试"
th.Abort()
End if
End Sub