ADO DOT NET
Centurion
- Joined
- Dec 20, 2006
- Messages
- 160
Hi,
I use this to set focus while running my code on a thread:
I can do everything I need but I cannot use Me.Close in a thread!
How should I change the above code to close the form inside a thread for me and then finish thread?
I use this to set focus while running my code on a thread:
Visual Basic:
Delegate Sub SetFocusCallback()
Private Sub SetFocus()
On Error Resume Next
If Me.ProcessButtonX.InvokeRequired Then
Dim d As New SetFocusCallback(AddressOf SetFocus)
Me.Invoke(d)
Else
Me.ProcessButtonX.Focus()
End If
End Sub
How should I change the above code to close the form inside a thread for me and then finish thread?