ADO DOT NET
Centurion
- Joined
- Dec 20, 2006
- Messages
- 160
Hi everyone
I have a thread question!
I use this code to start a thread:
And here is inside my thread:
I want to know how can I CLOSE the form from inside thread?
Please help me as I am not very PRO in threads!
For example, I know to set the TEXT in a thread I should use this:
But cannot imagine how to close the form!
I have a thread question!
I use this code to start a thread:
Visual Basic:
Dim Threads As New Thread(New ParameterizedThreadStart(AddressOf MyThread))
Threads.Start()
Visual Basic:
Private Sub MyThread(ByVal o As Object)
...
End Sub
Please help me as I am not very PRO in threads!
For example, I know to set the TEXT in a thread I should use this:
Visual Basic:
Private Delegate Sub SetAccountsTextCallback(ByVal Message As String)
Private Sub SetAccountsText(ByVal Message As String)
On Error Resume Next
If Me.AccountsProgressBarX.InvokeRequired Then
Dim d As New SetAccountsTextCallback(AddressOf SetAccountsText)
Me.Invoke(d, New Object() {Message})
Else
Me.AccountsProgressBarX.Text = Message
End If
End Sub