The code you posted declares the event to raise it you'd use Raiseevent just like in VB6. You can also declare an Event as a Delegate or use a system delegate.
VB Code:
'in class declaration of an event Public Event Changed(ByVal sender as object, ByVal e as EventArgs) 'in class declaration of an event using a system delegate Public Event Changed As EventHandler 'in class declaration of a delegate and event for it Public Delegate Sub ChangedHandler(ByVal sender as object, ByVal e as EventArgs) Public Event Changed as ChangedHandler 'in all cases you can raise the event from within the class like this RaiseEvent Changed(Me, Nothing)




Reply With Quote