OnMouseMove Event

See Also Applies To Example Model

Occurs when the observer moves the mouse on the Screen display.

Private Sub object_OnMouseMove(ByVal Point as VPoint, ByVal Button As Integer, ByVal Shift As Integer)

object    A reference to a World control object sited on a Worksheet.

Point    A VPoint object corresponding to the x-y location of the mouse when the event occurred.

Button    The mouse button that was pressed. Can be one of the following VbtMouseButton constants: vbtNoButton, vbtPrimaryButton, vbtSecondaryButton, or vbtMiddleButton.

Shift    The state of the SHIFT, CTRL, and ALT keys when the event occurred. Can be one of or a sum of the following values: 0 - no keys ; 1 - SHIFT key ; 2 - CTRL key ; 4 - ALT key.

Remarks

The MouseEvents property must be set to True for this event to be enabled.

Use a OnMouseMove event procedure to specify actions that will occur when the mouse passes over the Screen object display area

Example

The following example uses the OnMouseMove method to take mouse control of a Bot.

Private Sub World1_OnMouseMove(ByVal Point as VPoint, ByVal Button as Integer, ByVal Shift as Integer)
    Bot.MoveTo Point
End Sub