BBjSystemMetrics::getScreenImage

Description

In BBj 15.0 and higher, this BBjSystemMetrics method returns the screen as a BBjImage.

Syntax

Return Value

Method

BBjImage

getScreenImage()

getScreenImage(int x, int y, int width, int height)

getScreenImage(int screen)

getScreenImage(int screen, int x, int y, int width, int height)

Parameters

Variable

Description

screen

Screen number (BBj 26.00 and higher). Must be >= 0 and < BBjSystemMetrics::getScreenCount.

x

Horizontal position of the upper-left corner.

y

Vertical position of the upper-left corner.

width

Width of the image.

height

Height of the image.

Return Value

Returns the screen as a BBjImage.

ClosedVersion History

  • BBj 26.00: Added getScreenImage(int screen) and getScreenImage(int screen, int x, int y, int width, int height) overloads.
  • BBj 15.00: Method first introduced.

Example

rem ' getScreenImage

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
metrics! = sysgui!.getSystemMetrics()
image! = metrics!.getScreenImage()
image$ = image!.getBytes("png")
image = unt
open (image,mode="O_CREATE,O_TRUNC")"./getScreenImage.png"
writerecord (image)image$
close (image)
end

See Also

BBjAPI

BBjSysGui

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.