Dim check As Thread Private Sub RunThread() Dim newThread1 As New ThreadStart(AddressOf Checkdata) check = New Thread(newThread1) check.Start() End Sub Private Sub Checkdata() Dim dt As Date Dim dset As DataSet Dim prr() As Object dt = Date.Now.AddMinutes(5) For i As Integer = 0 To 5 If Date.Now > dt Then dt = Date.Now.AddMinutes(1) prr = {objBranch.BranchKey} Try Dim objUIDataGetBranch As BranchSelectionFetch.UIDataWCFClient objUIDataGetBranch = New BranchSelectionFetch.UIDataWCFClient("IndependentFetchDataEndPtHttp") byteBranchSelectionData = objUIDataGetBranch.WCFAuxValuesByte(CRisMACEntity.ApplicationDown, prr) objUIDataGetBranch.Close() prr = Nothing DecompressData(byteBranchSelectionData) dset = ds Catch ex As Exception End Try If dset IsNot Nothing Then If dset.Tables(0).Rows.Count > 0 Then Application.ExitThread() Application.Exit() Application.DoEvents() check.Abort() End If End If End If i = 0 Next End Sub
Next
Application.ExitThread()
Application.Exit()
Application.DoEvents()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)