Skip to content

DesktopScreenshot.cs

Avrigeanu Laurian edited this page Apr 14, 2023 · 1 revision

DesktopScreenshot(saveToPath: string) : void

Parameters

  • saveToPath (string): The full path, including the file name, where the screenshot will be saved. The file format must be supported by the .NET Imaging library (e.g., .png, .jpg, .bmp).

Returns

  • None (void).

Remarks

  • This method captures a screenshot of the desktop and saves it to the specified path. It uses the _automation.GetDesktop() method to get the desktop object, and the CaptureToFile() method to save the screenshot to the provided path. Make sure to specify a valid file path and format when calling this method.
Clone this wiki locally