public notinheritable class myClass
Private txt As String = ""
Public Delegate Sub SetInfoPercentageDelegate(ByVal Percentage As Integer)
Public Sub SetInfo(ByVal Text As String)
txt = Text
If Me.InvokeRequired Then
Dim SI As New SetInfoTextDelegate(AddressOf SetInfo)
Me.Invoke(SI, New Object() {Text})
Else
tbStatus.Text = Text
End If
End Sub
End class
My problem: According to my reasoning, when an invoke is required, the if condition is satisfied and the program should execute the IF part. And since in the IF part, the Setinfo method is invoked, the program should run through the Else part on the next step. But it doesn't do so... Can anybody help me with this? Thanks.
Last edited by HanneSThEGreaT; February 14th, 2009 at 03:32 AM.
Reason: Added Code Tags!
Bookmarks