F
fniles
How can I call BeginInvoke for a sub that has a parameter ?
I have a sub WriteInput that change the Text field txtInput with the value
passed in its parameter.
How can I call WriteInput using BeginInvoke ?
The following codes gave me "parameter count mismatch" error.
Public Delegate Sub WriteLineDelegate2(ByVal data() As Object)
Public Sub WriteInputGL(ByVal data() As Object)
Dim ar1 As IAsyncResult
ar1 = BeginInvoke(New WriteLineDelegate2(AddressOf WriteInput),
data)
End Sub
Private Sub WriteInput(ByVal data() As Object)
Dim Line As String
Line = CType(data(0), String)
Me.txtInput.Text = Line
End Sub
Dim arrObject() As Object
arrObject(0) = "this is a test"
WriteInputGL(arrObject)
I have a sub WriteInput that change the Text field txtInput with the value
passed in its parameter.
How can I call WriteInput using BeginInvoke ?
The following codes gave me "parameter count mismatch" error.
Public Delegate Sub WriteLineDelegate2(ByVal data() As Object)
Public Sub WriteInputGL(ByVal data() As Object)
Dim ar1 As IAsyncResult
ar1 = BeginInvoke(New WriteLineDelegate2(AddressOf WriteInput),
data)
End Sub
Private Sub WriteInput(ByVal data() As Object)
Dim Line As String
Line = CType(data(0), String)
Me.txtInput.Text = Line
End Sub
Dim arrObject() As Object
arrObject(0) = "this is a test"
WriteInputGL(arrObject)