guides:programming:programmers_reference_manual:cursorpos_property_system

CURSORPOS property (System)

Retrieves the cursor position for the last Windows message retrieved by the PS in screen coordinates.

If the name of a window or control is passed in the index argument the returned coordinates will be scaled to DIPs based on the DPI and scale factor of the passed object.

This is an @fm-delimited array containing the cursor coordinates, formatted as:

<1> X-Position

<2> Y-Position

DevelopmentRuntimeIndexedScaledSynthetic
N/AGetYesSee DescriptionNo

This property is essentially a wrapper around the GetMessagePos Windows API function, so please refer to the documentation on the Microsoft website for further information.

 
// Get the current screen position of the cursor in pixels

  

  CursorPos = Get_Property( "SYSTEM", "CURSORPOS" )

  

  // Get the screen position of the cursor in DIPs with respect  

  // to the current window

    

  CursorPos = Get_Property( "SYSTEM", "CURSORPOS", @Window )
 
 
 

ASYNCCURSORPOS property

  • guides/programming/programmers_reference_manual/cursorpos_property_system.txt
  • Last modified: 2023/10/25 10:49
  • by 127.0.0.1