J
John Wright
I have a delegate that I have defined as follows:
Public Delegate Sub myDelegate (ByVal txtBox as TextBox, byval Port as
System.IO.Ports.SerialPort)
I have a sub with the same definition. When I try to call the delegate with
an invoke I can't figure out the syntax to call it with both parameters. I
have tried:
TextBox1.Invoke(New myDelegate(AddressOf UPdateTextBox()), New Object()
{TextBox1,SerialTare})
Thinking it would work, but I can't get the signature right. I keep getting
the compiler error Argument not specified for parameter Port.
How can I write the invoke method with the correct signature to pass in both
parameters?
John
Public Delegate Sub myDelegate (ByVal txtBox as TextBox, byval Port as
System.IO.Ports.SerialPort)
I have a sub with the same definition. When I try to call the delegate with
an invoke I can't figure out the syntax to call it with both parameters. I
have tried:
TextBox1.Invoke(New myDelegate(AddressOf UPdateTextBox()), New Object()
{TextBox1,SerialTare})
Thinking it would work, but I can't get the signature right. I keep getting
the compiler error Argument not specified for parameter Port.
How can I write the invoke method with the correct signature to pass in both
parameters?
John