GefEventContext.GetMouseEvent (method)

Gets the values of the mouse event parameters.
Syntax: Boolean = object.GetMouseEvent ( X, Y, ButtonFlags )
Parameters:
X As long* -
Y As long* -
ButtonFlags As long* -
Description: This method is only valid for events of type gefEventLBMouseDown, gefEventLBMouseUp, and gefEventWhileLBMouseDown.

The X,Y, and ButtonFlags parameters are of type Long passed ByRef and must therefore be Basic variables, not expressions. The X and Y parameters return the mouse coordinates in TWIPS at the time of the event. The ButtonFlags parameter has one or more of the flags specified in gefMouseButtonFlags set.

Example:

Sub EventContext_GetMouseEvent()
    
    Dim oCimEvntContext As GefEventContext
    Dim nX As Long
    Dim nY As Long
    Dim nBtnFlags As Long
    Dim bMouseEvnt As Boolean
    
    Set oCimEvntContext = CimGetEventContext
    
    bMouseEvnt = oCimEvntContext.GetMouseEvent(nX, nY, nBtnFlags)
    If bMouseEvnt = True Then
        MsgBox "The X coodinate is " & nX
        MsgBox "The Y coodinate is " & nY
        MsgBox "The Buttons Flags are " & nBtnFlags
    End If
    
End Sub