GefObjectEvents.GetPreContextMenu (method)

Gets the GefObjectEvent for the 'Before Context Menu' event.
Syntax: Set GefObjectEvent = object.GetPreContextMenu ( Create )
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 GetPreContextMenu gets or creates a PreContextMenu event.


Sub GefObjectEvents_GetDialogClose()
    Dim oCimObj As GefObject
    Dim oCimObjEvnts As GefObjectEvents
    Dim oCimObjEvnt As GefObjectEvent
    Set oCimObj = CimGetObject
    Set oCimObjEvnts = oCimObj.Events
    Set oCimObjEvnt = oCimObjEvnts.GetPreContextMenu
    If Not oCimObjEvnt Is Nothing Then
        MsgBox "The action name is " & oCimObjEvnt.ActionName
        MsgBox "No PreContextMenu events configured for this object"
    End If
End Sub