mouseMove

mouseMove(button:  Integer;             (Form)
          shift:   Integer;
          x:       Real;
          y:       Real);

mouseMove(control: control-type input;  (Control)
          button:  Integer;
          shift:   Integer;
          x:       Real;
          y:       Real);

The mouseMove event occurs when the user moves the mouse.

The parameters of the mouseMove event are listed in the following table.

Parameter Description
button The state of the mouse buttons as an integer, in which a bit is set if the button is down.
 
  • 0 (no button down)

 
  • 1 (left button)

 
  • 2 (right button)

 
  • 3 (middle button)

shift The state of the Shift, Ctrl, and Alt keys when the button specified in the button parameter was pressed or released. A bit is set if the key is down. The shift parameter is a bit integer, with the least-significant bits corresponding to the Shift key (bit 0), the Ctrl key (bit 1), and the Alt key (bit 2).
  The shift parameter indicates the state of these keys. Some, all, or none of the bits can be set, indicating which keys were pressed. For example, if both Ctrl and Alt were pressed, the value of shift would be 6.
x The current left physical position of the mouse pointer in the window. This is in the units of the scaleMode property of the form or control.
y The current top physical position of the mouse pointer in the window. This is in the units of the scaleMode property of the form or control.

For details about converting the horizontal (x) and vertical (y) physical pixel positions to logical positions within the window that has been scrolled, see the scrollHorzPos property.

The mouseMove event is generated continually as the mouse pointer moves across objects. Unless another object has captured the mouse, an object recognizes a mouseMove event whenever the mouse position is within its borders.

You can use the mouseDown and mouseUp events to respond to events caused by pressing and releasing mouse buttons, or the mouseLeave event to respond to the user moving the mouse off the control.

Any time you move a window inside a mouseMove event, it can cascade, as mouseMove events are generated when the window moves underneath the cursor. A mouseMove event can be generated even if the mouse is stationary.

The first mouseMove event received after left-clicking a control in thin client mode immediately generates a mouseMove event call to the application server (when that control has logic defined for that event). The mouseMove time processing then starts with the next mouseMove event that is received.

For details about getting and setting the handling of the mouseMove event to optimize performance on presentation clients in JADE thin client mode, see the Application class getMouseMoveTime and setMouseMoveTime methods.

Consider using the mouseHover event to reduce the number of event calls to the application server.