Sup Guys,
I Have a Function on my frmMain Class wich will update my control to something else after an invoke. When i type "?Label1.Text" on the Immediate Window, the text property IS updated, but when i go check the Form, nothing happened. The code is just like this
Public Sub UpdateUI()
If (Me.InvokeRequired = True) Then
Invoke(New MethodInvoker(AddressOf UpdateUI))
End If
Label1.Text = "ITS NOT WORKING =\"
End Sub
On my bgWorker Class:
Private threadUpd As New Threading.Thread(AddressOf Updater)
Private _active as Boolean
Public Sub New()
_active = True
threadLimpar.IsBackground = True
threadLimpar.Start()
End Sub
Public Sub Updater()
Do
If (_active = False) Then
Try
Thread.Sleep(Timeout.Infinite)
Catch ex As ThreadInterruptedException
End Try
Else
if(condition...) then
frmMain.UpdateUI
End if
Loop
End Sub