WBITMAP-CAPTURE-DESKTOP (op-code 8)

This operation captures a screen shot of the entire desktop and stores it as an image file. All image types supported by the Microsoft CImage class are also supported by WBITMAP-CAPTURE-DESKTOP.

Notes:
  • For a list of supported image types, see the Microsoft CImage class documentation.
  • If you are using this operation in a thin client environment, see Accessing Local Resource Files in the AcuConnect User's Guide for special considerations.

This operation takes two additional parameters:

name This required alphanumeric literal is the name of the file in which the image is saved.

The type of image saved depends on the file extension specified. For example, a file extension of .jpg saves the image as a JPEG file; a file extension of .png saves the image as a PNG file, etc.

The name may include embedded spaces.

The length of this parameter may not exceed 90 characters, including the path; however, this limit might vary on different operating systems.

This parameter is not affected by the FILE_PREFIX configuration variable.

If a file of the specified name already exists, it is overwritten unless it is read-only.

If this parameter is omitted or set to spaces, the image is saved to the Windows clipboard.

colordepth This optional numeric data item sets the number of color bits per pixel used when capturing the image. If this value is not specified, the screen default is used. The default color density of a screen is a property of the video adapter driver. On most modern PCs it is 24-bits per pixel. This parameter is not used when images are saved to the clipboard. This parameter may be set to one of the following values:
  • 1 - Monochrome
  • 4 - 4-bits per pixel
  • 8 - 8-bits per pixel (256 colors)
  • 16 - 16-bits per pixel
  • 24 - 24-bits per pixel (True color)
  • 32 - 32-bits per pixel (True color)

When making copies of all or part of the screen, do not use higher color density than necessary. Color is memory intensive and a higher color density does not improve image quality as much as it results in a larger file size. Consider what you will use the image for and set colordepth accordingly. Many tools do not support bitmaps with more than 256 colors. A color density setting of 8 is adequate for most situations.