ON_MOUSE_MOVE

ON_MOUSE_MOVE N,L

EXECUTES THE PROGRAM FROM LABEL L WHEN THE USER MOVES THE MOUSE ON THE SYSTEM OBJECT NUMBER N

  • Type: Command
  • Parameters: 2
  • Group: Events

ACTION

The command ON_MOUSE_MOVE N,L assigns a label (which must be defined in the program) from which the program will run every time the user moves the mouse on the system object designated by the number N.

The system object must be one of the following types: SCENE3D, BUTTON , EDIT, MEMO, ALPHA, FORM, LIST, PICTURE, CHECK, OPTION, PROGRESS_BAR, SPIN, GRID, CONTAINER, SCENE2D, PANEL, CONTAINER_TAB, TAB.

SYNTAX: ON_MOUSE_MOVE N,L

  • N = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.
  • L = Label.

USE

  • The command ON_MOUSE_MOVE is used to associate an event (MOUSE_MOVE) happening to a system object, to a program location (defined by the label L).
  • When the event occurs, the program named by the label is executed.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is less than 0.
  • If system object number N does not exist.
  • If system object number N is not of the type : SCENE3D, BUTTON , EDIT, MEMO, ALPHA, FORM, LIST, PICTURE, CHECK, OPTION, PROGRESS_BAR, SPIN, GRID, CONTAINER, SCENE2D, PANEL, CONTAINER_TAB, TAB.
  • If the label L does not exist.
  • If L is not a correct label name.

EXAMPLE

dim c%

label mousemove

memo 1

left 1,300

caption 0,"Move mouse on MEMO"

on_mouse_move 1, mousemove

end

mousemove:

c%=c%+1

caption 0,"MOUSE_MOVE "+str$(c%)+" times"

if c%>10 then off_mouse_move 1

return

SEE ALSO

ON_MOUSE_UP

ON_MOUSE_DOWN

OFF_MOUSE_UP

OFF_MOUSE_DOWN

OFF_MOUSE_UP