0% found this document useful (0 votes)
34 views1 page

"You Clicked The Button Labeled ": ' Place Methods and Properties Here

The code defines a base class with a public event that passes an integer. It also defines a derived class that inherits from the base class. The derived class contains an event handler sub that handles the base class event, allowing it to process events raised in the base class.

Uploaded by

Bob
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views1 page

"You Clicked The Button Labeled ": ' Place Methods and Properties Here

The code defines a base class with a public event that passes an integer. It also defines a derived class that inherits from the base class. The derived class contains an event handler sub that handles the base class event, allowing it to process events raised in the base class.

Uploaded by

Bob
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

VB

Protected Sub AnyClicked(ByVal sender As Object, ByVal e As System.EventArgs) _


Handles Button1.Click, Button2.Click, Button3.Click
Dim b As Button = CType(sender, Button)
Response.Write("You clicked the button labeled " & b.ID)
End Sub

VB
Public Class BaseClass
Public Event BaseEvent(ByVal i As Integer)
' Place methods and properties here.
End Class

Public Class DerivedClass


Inherits BaseClass
Sub EventHandler(ByVal x As Integer) Handles MyBase.BaseEvent
' Place code to handle events from BaseClass here.
End Sub
End Class
VB
Public Class BaseClass
Public Event BaseEvent(ByVal i As Integer)
' Place methods and properties here.
End Class

Public Class DerivedClass


Inherits BaseClass
Sub EventHandler(ByVal x As Integer) Handles MyBase.BaseEvent
' Place code to handle events from BaseClass here.
End Sub
End Class

You might also like