I've got the following code:
Public Delegate Sub SetStatusBarTextDelegate(ByVal StatusText As String)
Private Sub SetStatusBarText(ByVal StatusText As String)
If Me.InvokeRequired Then
Me.Invoke(New SetStatusBarTextDelegate(AddressOf SetStatusBarText), StatusText)
Else
Me.labelScanningProgress.Text = StatusText
End If
End Sub
The problem is that, when I call the "SetStatusBarText" sub from another thread, InvokeRequired is True (as it should be), but then my threads stall on the Me.Invoke statement - pausing execution shows them all just sitting there, not actually invoking anything.
Any thoughts about why the threads seem to be afraid of the Invoke?