ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Drawing functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Copies the screen contents to a variable of type Image or to an Image control.
Example
// Copies the screen contents to an Image variable
MyImage is Image 
MyImage = dCopyScreenImage()
// Assignment in an Image control
IMG_Image = MyImage
Syntax

Capturing a screenshot by specifying the coordinates of a specific area Hide the details

<Result> = dCopyScreenImage([<X> [, <Y> [, <Width> [, <Height>]]]])
<Result>: Image or Binary Buffer variable
  • Name of the Image variable that will contain the screenshot
  • Binary buffer corresponding to the image. This buffer can be directly assigned to an Image control.
<X>: Optional integer
X-coordinate (in pixels) of the upper-left corner of the area to be captured (0 by default, i.e., upper-left corner of screen 1).
<Y>: Optional integer
Y-coordinate (in pixels) of the upper-left corner of the area to be captured (0 by default, i.e., upper-left corner of screen 1).
<Width>: Optional integer
Width (in pixels) of the area to be captured (width of the screen by default).
<Height>: Optional integer
Height (in pixels) of the area to be captured (height of the screen by default).

Capturing a screenshot by defining the source area with a Rectangle variable Hide the details

<Result> = dCopyScreenImage([<Area to be copied>])
<Result>: Image or Binary Buffer variable
  • Name of the Image variable that will contain the screenshot
  • Binary buffer corresponding to the image. This buffer can be directly assigned to an Image control.
<Area to be copied>: Rectangle variable
Name of the Rectangle variable that corresponds to the rectangular area to be captured.
Remarks
Warning: If the screen contains a WINDEV window with the "Allow window screenshot" option ("Detail" tab of the description window) unchecked, the window image will be black.. You can change this option programmatically, using the ScreenshotAllowed property.
Business / UI classification: Neutral code
Component: wd300pnt.dll
Minimum version required
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/30/2024

Send a report | Local help