PictureUnderMouse Property (Desktop Objects)

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


The Desktop.PictureUnderMouse property returns a screenshot of the rectangular area around the mouse cursor position. The image can optionally include the mouse cursor image.


TestObj.PictureUnderMouse(Width, Height, Mouse)

Read-Only Property A Picture object
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
Width [in]    Required    Integer    
Height [in]    Required    Integer    
Mouse [in]    Optional    Boolean Default value: True   

Applies To

The property is applied to the following object:

View Mode

This property is available in the Object Browser panel and in other panels and dialogs in both Basic and Advanced view modes.


The property has the following parameters:


The width (in pixels) of the rectangular area to capture.


The height (in pixels) of the rectangular area to capture.


If True (default), the captured image includes the mouse cursor image; if False, the image of the mouse cursor is not included.

Property Value

A Picture object that contains the captured image.


For an example of using the PictureUnderMouse property, see Finding an Image Within Another Image.

See Also

Picture Object
Picture Method (Desktop Objects)
MouseX Property (Desktop Objects)
MouseY Property (Desktop Objects)
ObjectFromPoint Method (Desktop Object)

Highlight search results