InertiaM
Well-known member
I need to update a ToolStripStatusLabel from a different thread. As the TSSL has no invoke, I tried the following code :-
called by
The messagebox shows so I know it is being executed, but the TSSL doesnt get updated Any ideas?
VB.NET:
Delegate Sub SetBarcodeInvoker(ByVal Barcode As String)
Public Sub SetBarcodeText(ByVal Barcode As String)
If StatusStrip1.InvokeRequired Then
StatusStrip1.Invoke(New SetBarcodeInvoker(AddressOf SetBarcodeText), Barcode)
Else
tsslBarcode.Text = Barcode
End If
End Sub
called by
VB.NET:
Form1.SetBarcodeText("TEST")
MessageBox.Show("TEST")
The messagebox shows so I know it is being executed, but the TSSL doesnt get updated Any ideas?