Skip to content

OnMouseMove - cWinControl

Received whenever the mouse cursor moves over a control

Type: Event

Parameters

Parameter Type Description
x Integer Specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area.
y Integer Specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area.
fKeys Integer the keys that were pressed when the mouse button was pressed. It will be one or more of the following constants:ConstantMeaning

Syntax

Procedure OnMouseMove Integer x Integer y Integer fKeys

Description

Whenever a user moves the mouse cursor over the client-area of a control, it will recieve an OnMouseMove event.

Col 1 Col 2
Note: Mouse messages are sent to the window beneath the cursor, unless it is captured, in which case the captured window will receive the mouse messages.

This sample shows how to extract the information from the eButton and fKeys parameters:

Procedure OnMouseMove Integer x Integer y Integer fKeys
    Integer bShiftKey bControlKey bLeftButton bRightButton

    Move (IsFlagIn(mkShift, fKeys))   To bShiftKey
    Move (IsFlagIn(mkControl, fKeys)) To bControlKey
    Move (IsFlagIn(mkLeft, fKeys))    To bLeftButton
    Move (IsFlagIn(mkRight, fKeys))   To bRightButton

    Showln 'OnMouseMove ' x ' ' y ;
      'shift=' bShiftKey ' ctrl=' bControlKey ;
      'left=' bLeftButton ' right=' bRightButton
End_Procedure

See Also

OnMouseDoubleClick | OnMouseDown | OnMouseUp