GefObjectEvent.Type (read-only property)

Gets the type of the event.
Syntax: GefEventTypeEnum = object.Type
Description: The type of the event will also determine which other properties (such as Key) are valid.


Sub GefObjectEvent_Type()
    Dim oCimObj As GefObject
    Dim oCimObjEvnts As GefObjectEvents
    Dim oCimObjEvnt As GefObjectEvent
    Set oCimObj = CimGetObject
    Set oCimObjEvnts = oCimObj.Events
    Set oCimObjEvnt = oCimObjEvnts.Item(0)
    Select Case oCimObjEvnt.Type
        Case gefEventNone
            MsgBox "The event does not have a type"
        Case gefEventLBMouseDown
            MsgBox "The left mouse button went down"
        Case gefEventLBMouseUp
            MsgBox "The left mouse button went up"
        Case gefEventKeyDown
            MsgBox "A key was pushed down"
        Case gefEventKeyUp
            MsgBox "A key was released"
        Case gefEventWhileLBMouseDown
            MsgBox "The left muse button is held down"
        Case gefEventWhileKeyDown
            MsgBox "A key is held down"
        Case gefEventPeriodic
            MsgBox "This event is periodic"
        Case gefEventExpressionHigh
            MsgBox "The expression's value is high"
        Case gefEventExpressionUpdate
            MsgBox "The expression's value has changed"
        Case gefEventScreenOpen
            MsgBox "The screen was opened"
        Case gefEventScreenClose
            MsgBox "The screen was closed"
        Case gefEventActiveX
            MsgBox "An event on the OLE control was activated"
        Case gefEventObjectInserted
            MsgBox "The object was inserted"
        Case gefEventObjectRemoved
            MsgBox "The object was removed"
        Case gefEventSmartObject
            MsgBox "The smart object event was triggered"
        Case gefEventRBMenuItem
            MsgBox "A menu event was triggered"
    End Select
End Sub