サップガイズ、
frmMain クラスに関数があり、呼び出し後にコントロールを別のものに更新します。イミディエイト ウィンドウに「?Label1.Text」と入力すると、テキスト プロパティが更新されますが、フォームを確認しても何も起こりません。コードはこんな感じ
Public Sub UpdateUI()
If (Me.InvokeRequired = True) Then
Invoke(New MethodInvoker(AddressOf UpdateUI))
End If
Label1.Text = "ITS NOT WORKING =\"
End Sub
私の bgWorker クラス:
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