G
Guest
Hi,
I have defined a delegate like this:
Delegate Sub ShowProgressDelegate(ByVal dblPctDone As Integer, ByVal iMax As
Integer, ByRef bCancel As Boolean)
Private Sub cmdExecute_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdExecute.Click
Dim dblPctDone As Double
Dim iMax As Integer = 0
Dim ShowProgress As ShowProgressDelegate
.....
ShowProgress = AddressOf ShowProgress(dblPctDone, iMax, False)
I get this compile error:
'AddressOf' operand must be the name of a method; no parentheses are needed.
how do I fix that please?
thanks
Philip
I have defined a delegate like this:
Delegate Sub ShowProgressDelegate(ByVal dblPctDone As Integer, ByVal iMax As
Integer, ByRef bCancel As Boolean)
Private Sub cmdExecute_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdExecute.Click
Dim dblPctDone As Double
Dim iMax As Integer = 0
Dim ShowProgress As ShowProgressDelegate
.....
ShowProgress = AddressOf ShowProgress(dblPctDone, iMax, False)
I get this compile error:
'AddressOf' operand must be the name of a method; no parentheses are needed.
how do I fix that please?
thanks
Philip