|Manuals

TVirtualUI.TakeScreenshot Method

Description

This method captures a screenshot of a specified window and saves it to a file.

Syntax

function TakeScreenshot(Wnd: Integer; const FileName: WideString): WordBool; safecall;

Parameters

Parameter Type Description
Wnd Integer The window handle to be captured
FileName WideString Complete file path for saving the screenshot

Return Value

Returns a WordBool value indicating success or failure of the screenshot operation.

Supported File Formats

The method accepts the following image file extensions:

  • .jpg
  • .bmp
  • .png