The name of a procedure that is referenced by the procedure delegate
AddressOf operator returns a procedure
delegate instance that references a specific procedure.
AddressOf operator is used in the following
If a parameter to a procedure (a VB procedure or a Win32 API function) requires a function pointer (the address of a function), then we can pass the expression:
functionname is the name of the
function. This function is called a callback function.
AddressOf is also used to create delegate objects,
delg = New ADelegate(AddressOf obj.AMethod)
AddressOf is used to bind event handlers to events
AddHandler Form1.Click, AddressOf Me.Form1Click
In VB 6, the
AddressOf operator can only be used
in a call to a Windows API function. Moreover, the argument passed to
AddressOf must be the name of a procedure in a
standard code module. However, in VB.NET these restrictions no longer