CimGetEventContext (function)

Syntax GefEventContext = CimGetEventContext ( )
Description Returns the GefEventContext Automation object representing the event that caused this script to run.
Status The extension can be used.
Example

                Dim ev As GefObjectModel.GefEventContext
                Dim x As Long
                Dim y As Long
                Dim flags As Long
                Set ev = CimGetEventContext()
                If ev.GetMouseEvent(x, y, flags) Then
                ??'Center Object on mouse coordinates
                ??x = x - ev.TriggerObject.Width / 2
                ??y = y + ev.TriggerObject.Height / 2
                ??ev.TriggerObject.Left = x
                ??ev.TriggerObject.Top = y
                ??ev.Parent.Refresh False
              
End If