AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de Windows / Funciones del cursor del ratón
  • Error
  • Miscellaneous
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Otros
Procedimientos almacenados
Used in an linked mouse or stylus event (click code, hover code, left or right button pressed code, etc.) returns the horizontal position (X) of the mouse cursor relative to the control or window in question.
You can get:
  • the position of the mouse (or stylus) when an Image control is clicked (function used in the "Click" event of the Image control).
  • the position of the mouse (or stylus) when hovering over a window (function used in the optional "Mouse hover" event of a window).
Remarks:
    Ejemplo
    Reportes y Consultas
    // Survol souris de la fenêtre "FEN_Dessin"
    // Code optionnel de la fenêtre
    Message("Position de la souris: X: " + MouseXPos() + " Y: " + MouseYPos())
    Reportes y Consultas
    // Affiche un message différent selon l'endroit cliqué
    IF MouseXPos() > 25 THEN
    	Info("A droite")
    ELSE
    	Info("A gauche")
    END
    Sintaxis
    Reportes y Consultas

    Retrieving the mouse position in a window Ocultar los detalles

    <Result> = MouseXPos([<Origine>])
    <Result>: Integer
    • Horizontal position (X-coordinate) of the mouse or stylus, in pixels. By default, this position is relative to the upper-left corner of the control on which the left mouse button was pressed.
    • -1 if an error occurred.
    <Origine>: Optional Integer constant
    Origin used for position calculation:
    mpControl
    (Default value)
    Mouse position relative to the upper-left corner of the hovered control or window, depending on where the event occurs.
    mpImageMouse position in the Image control (relative to the upper-left corner).

    This constant should only be used when MouseXPos is called in an event associated with an Image control. Otherwise, MouseXPos will return -1.
    mpScreenMouse position in the screen (relative to the upper-left corner).
    mpWindowMouse position relative to the upper-left corner of the window.

    Observaciones
    Reportes y Consultas

    Error

    The main error codes are as follows:
    • No window is opened.
    • No mouse click is performed.
    • MouseXPos is not called in a mouse event.
    • The click code is executed by Execute or ExecuteProcess.
    Reportes y Consultas

    Miscellaneous

    • You can get the vertical position of the mouse or stylus with MouseYPos.
    • MouseXPos used in the selection code of row or table always returns 0.
    Componente: wd290obj.dll
    Versión mínima requerida
    • Versión 9
    Esta página también está disponible para…
    Comentarios
    Haga clic en [Agregar] para publicar un comentario

    Última modificación: 09/04/2024

    Señalar un error o enviar una sugerencia | Ayuda local