PC SOFT

AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

  • Capturing the mouse
CursorCapture (Example)
Capturing the mouse
The following example is used to capture:
  • the left mouse button down,
  • the right mouse button up,
  • the move of the mouse.
From the moment the mouse button is pressed until it is released, the mouse events are re-directed to the window. The mouse position is displayed in the status bar.
// Create a button with the following code on the click
Event("CursorStart", "*.", 513)  // WM_LBUTTONDOWN
Event("Cursor", "*.", 512)       // WM_MOUSEMOVE
Event("CursorEnd", "*.", 514)    // WM_LBUTTONUP
PROCEDURE CursorStart
CursorCapture()
PROCEDURE Cursor
Pos is int
Pos = CursorPos(cpScreen)
Message(LoWord(Pos) + " " + HiWord(Pos))
PROCEDURE CursorEnd
CursorCapture(False)
Versión mínima requerida
  • Versión 9
Comentarios
Haga clic en [Agregar] para publicar un comentario