Use this method to get object-related coordinates from coordinates that are relative to the screen.
|TestObj||A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section|
All onscreen objects.
To view this method in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.
The method has the following parameters:
Specifies the horizontal coordinate of the point relative to the screen.
Specifies the vertical coordinate of the point relative to the screen.
Point object that holds the resultant object-related coordinates.
Desktop testing: If TestObj refers to an object of a non-DPI-aware application running with a DPI setting other than 100%, the resulting
Point object will hold coordinates relative to the application (as if the application is running with the 100% DPI setting).
Web testing: If the Use CSS pixels for scaled pages option is enabled (by default), the resulting
Point object will hold coordinates that take into account the browser zoom and the current DPI setting.
To view an example that demonstrates how to use the
ScreenToWindow method, see Displaying Context Menus.