これはばかげているように聞こえるかもしれませんが、別のスレッドのプログレスバーにアクセスできません。はい、呼び出しました。見てみな:
Delegate Sub ProgressBarCallback(ByVal value As Integer, ByVal max As Integer)
Sub updateProgressBarCurrent(ByVal value As Integer, ByVal max As Integer)
If Me.progressBar_currentState.InvokeRequired = True Then
Dim d As New ProgressBarCallback(AddressOf updateProgressBarCurrent)
Me.progressBar_currentState.Invoke(d, New Object() {value, max})
Else
progressBar_currentState.Maximum = max
If value < max Then
progressBar_currentState.Value = value
progressBar_currentState.Refresh()
End If
End If
End Sub
クラス内のメソッドから updateProgressBarCurrent() を呼び出しています。デバッガーを見てください。
ProgressBar は何もしません。これは、databaseHandler クラスのメソッドからサブ updateProgressBarCurrent を呼び出しているためですか? どうすればこれを修正できますか? 前もって感謝します。