GefObjectEvents.GetActiveXEvent (method)

Gets the GefObjectEvent for the specified event type.
Syntax: Set GefObjectEvent = object.GetActiveXEvent ( EventName, Create )
EventName As String -
Optional Create As Boolean - If specified as True, an event of this type will be created if one does not already exist. The default is False.
Description: The GetActiveXEvent method gets or creates an ActiveX event. The EventName parameter indicates which ActiveX event is being used.


Sub GefObjectEvents_GetActiveXEvent()
    Dim oCimObj As GefObject
    Dim oCimObjEvnts As GefObjectEvents
    Dim oCimObjEvnt As GefObjectEvent
    Set oCimObj = CimGetObject
    Set oCimObjEvnts = oCimObj.Events
    'This ActiveX event is on the CIMPLICITY XY plot Control
    Set oCimObjEvnt = oCimObjEvnts.GetActiveXEvent("OnLeftButtonDoubleClick")
    If Not oCimObjEvnt Is Nothing Then
        MsgBox "The event's action name is " & oCimObjEvnt.ActionName
        MsgBox "There are no ActiveX events configured"
    End If
End Sub