You might be able to pass Nothing as the parameter. If that errors out (with a NullReference exception), then just create your own class that implements ISynchronizeInvoke. Simply return True out of the InvokeRequired property, and in the Invoke() method, simply call DynamicInvoke on the method. We don't use the Begin- or EndInvoke:Public Class CustomSynchronizeInvoke
Implements System.ComponentModel.ISynchronizeInvoke
Public Function BeginInvoke(ByVal method As System.Delegate, ByVal args() As Object) As System.IAsyncResult Implements System.ComponentModel.ISynchronizeInvoke.BeginInvoke
Throw New NotSupportedException()
End Function
Public Function EndInvoke(ByVal result As System.IAsyncResult) As Object Implements System.ComponentModel.ISynchronizeInvoke.EndInvoke
Throw New NotSupportedException()
End Function
Public Function Invoke(ByVal method As System.Delegate, ByVal args() As Object) As Object Implements System.ComponentModel.ISynchronizeInvoke.Invoke
Return method.DynamicInvoke(args)
End Function
Public ReadOnly Property InvokeRequired() As Boolean Implements System.ComponentModel.ISynchronizeInvoke.InvokeRequired
Get
Return True
End Get
End Property
End Class