hi all
on my start button ive got it running a sub in a new thread
VB Code:
Dim t As New Thread(AddressOf ObjSearch.PrimaryYellSearch) t.Name = "YellPrimarySearch" t.IsBackground = True t.Start()
ive got another button which is my plause/resume button but how do i plause/sleep the thread when its been clicked????
VB Code:
Dim t As Thread Try If Me.btnManage.Text = "Plause" Then Me.btnManage.Text = "Resume" t.Sleep(True) Me.btnManage.Update() Else Me.btnManage.Text = "Plause" t.Sleep(False) Me.btnManage.Update() End If Catch ex As Exception MsgBox(ex.ToString, MsgBoxStyle.Critical, "Application Error") End Try


Reply With Quote