Custom Event Arguments
page 3 of 3
by . .
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 19903/ 44

Setting up and raising the event

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.


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2021 ASPAlliance.com  |  Page Processed at 2021-03-07 3:33:07 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search