Eae Eae - 1 year ago 81
Vb.net Question

Call a method with parameters

I want to call a method when an animation ends. I'm using this statement:

AddHandler anim.Completed, AddressOf anim_completed

But i want the anim_completed sub to be with parameters. Any ideas how to do that?

Answer Source

Simple solution. Use Anonymous Event Handler, then you will be able to access Ellipse object directly.

Dim target As Ellipse = Nothing

AddHandler anim.Completed, Sub()
                                If target IsNot Nothing Then

                                End If
                            End Sub
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download