Method
IsEventImplemented
Description
Used to determine if a specific event has been implemented (has code) or not.
Usage
result = IsEventImplemented(eventName)
Part |
Type |
Description |
---|---|---|
result |
||
eventName |
The event whose implementation state is being determined. |
or
result = IsEventImplemented(obj, eventName)
Part |
Type |
Description |
---|---|---|
result |
||
obj |
Object for which it is checked whether it has implemented the specified event. |
|
eventName |
The event whose implementation state is being determined. |
Notes
This method must be called from one of the events or methods of the same class.
It will return True whether the event was implemented by entering code directly into the event or if the event is being routed elsewhere via AddHandler.
Sample code
From the Opening event of a button subclass to determine if the Pressed event is implemented:
If IsEventImplemented("Pressed") Then
MessageBox("The Pressed event is implemented.")
End If
If you have a regular Button on your layout, you can determine if the Pressed event is implemented that way:
If IsEventImplemented(Button1, "Pressed") Then
MessageBox("The Pressed event is implemented.")
End If
Compatibility
Project Types |
Console, Desktop, Mobile, Web |
Operating Systems |
iOS, Linux, macOS, Windows |
See also
Introspection module.