BBjSystemMetrics::getScreenSize

Description

In BBj 5.0 and higher, this BBjSystemMetrics method returns the screen width and height in pixels.

In BBj 15.0 and higher, the method taking an int parameter returns the selected screen width and height in pixels

Syntax

Return Value

Method

Dimension

getScreenSize()

getScreenSize(int screen)

Parameters

Variable

Description

screen

Screen number. Must be >= 0 and < BBjSystemMetrics::getScreenCount

Return Value

Returns the screen size in pixels as a Dimension object.

Remarks

WebUI logo In the WebUI client, getScreenSize() returns the available client size of the browser window. If the browser environment provides multiscreen information, getScreenSize(screen) reports the dimensions of the specified screen. Multiscreen information is currently available only in a secure context (https or localhost) in Chromium-based browsers.

Example

rem ' BBjSystemMetrics::getScreenSize

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
metrics! = sysgui!.getSystemMetrics()
print "Default:"
print "getScreenResolution:",metrics!.getScreenResolution()," DPI"
print "getScreenSize: ",metrics!.getScreenSize()
print "getScreenBounds: ",metrics!.getScreenBounds()
print "getScreenInsets: ",metrics!.getScreenInsets()
screens = metrics!.getScreenCount()
for screen = 0 to screens-1
    print ""
    print "Screen",screen,":"
    print "getScreenSize",screen,": ",metrics!.getScreenSize(screen)
    print "getScreenBounds",screen,": ",metrics!.getScreenBounds(screen)
    print "getScreenInsets",screen,": ",metrics!.getScreenInsets(screen)
next screen

See Also

BBjAPI

BBjSysGui

Object Variables

Window Management API

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