ObjectFromPoint Method

Applies to TestComplete 15.64, last modified on May 16, 2024


The ObjectFromPoint method lets you obtain the onscreen object (a window, popup window or a non-handled object) that contains the pixel specified by X and Y, relative to the screen. You can use the WindowToScreen method of an onscreen object to convert client-area coordinates to screen coordinates.


TestObj.ObjectFromPoint(X, Y, FindTransparent)

TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
X [in]    Required    Integer    
Y [in]    Required    Integer    
FindTransparent [in]    Optional    Boolean Default value: False   
Result A window object

Applies To

The method is applied to the following objects:

View Mode

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:


The horizontal coordinate (relative to the screen) of the desired pixel.


The vertical coordinate (relative to the screen) of the desired pixel.


Specifies whether to retrieve nonwindowed controls. A nonwindowed control is a control that cannot receive the focus, cannot be the parent of other controls, and does not have its own window. For example, TLabel and TShape are nonwindowed controls.

The default value is False and nonwindowed controls are not obtained and their parent onscreen object is returned instead.

Result Value

The window object to which the specified pixel belongs.

See Also

ObjectFromPoint Method (Desktop Object)
WindowToScreen Method

Highlight search results