PictureUnderMouse Property (Desktop Objects)

Applies to TestComplete 14.80, last modified on April 20, 2021

Description

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.

Declaration

TestObj.PictureUnderMouse(WidthHeightMouse)

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.

Parameters

The property has the following parameters:

Width

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

Height

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

Mouse

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.

Example

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