Setting up the event and raising it
Now you need to create a Delegate for
the event which will contain the custom event handler string.
Public
Delegate
Sub bdetEventHandler(ByVal
sender As
Object,
ByVal e
As BrowserEventArgs)
Public Event
bdet As
bdetEventHandler |
The bdetEventHandler is the Delegate
for bdet which basically means that the event bdet takes in two
parameters - an object and BrowserEventArgs object.
RaiseEvent bdet(Me,
New
BrowserEventArgs("Mozilla")) |
The event hander will then have to look like
-
Sub SampMod_bdet(ByVal
sender As
Object,
ByVal e
As
BrowserEventArgs)
.... |
Summary
This article was just a quick tutorial of how
to get up some custom event arguments. There is a lot more you can do with
these than I showed you here (as you can probably imagine) and there will be
more information on Delegates in the future.