F
Franky
have some problem in translate the last row of this class this class:
Public Delegate Sub UIUpdate(ByVal args() As Object)
Public Class Invoker
Private _control As Control
Private _uiUpdate As UIUpdate
Private _args() As Object
Public Sub New(ByVal c As Control)
' store the control that is to run the method on its thread
_control = c
End Sub
Public Sub Invoke(ByVal UIDelegate As UIUpdate, _
ByVal ParamArray args() As Object)
' called by the client and passed the delgate that
' points to the method to run
' as well as the arguments
_args = args
_uiUpdate = UIDelegate
_control.Invoke(New EventHandler(AddressOf _invoke))
End Sub
Private Sub _invoke(ByVal sender As Object, ByVal e As EventArgs)
' this is now running on the same thread as the control
' so freely call the delegate
_uiUpdate.Invoke(_args) ' <== THIS LINE IS MY PROBLEMS
=================
End Sub
End Class
Can someone can help me please?!
Thanks
Public Delegate Sub UIUpdate(ByVal args() As Object)
Public Class Invoker
Private _control As Control
Private _uiUpdate As UIUpdate
Private _args() As Object
Public Sub New(ByVal c As Control)
' store the control that is to run the method on its thread
_control = c
End Sub
Public Sub Invoke(ByVal UIDelegate As UIUpdate, _
ByVal ParamArray args() As Object)
' called by the client and passed the delgate that
' points to the method to run
' as well as the arguments
_args = args
_uiUpdate = UIDelegate
_control.Invoke(New EventHandler(AddressOf _invoke))
End Sub
Private Sub _invoke(ByVal sender As Object, ByVal e As EventArgs)
' this is now running on the same thread as the control
' so freely call the delegate
_uiUpdate.Invoke(_args) ' <== THIS LINE IS MY PROBLEMS
=================
End Sub
End Class
Can someone can help me please?!
Thanks