BBjSystemMetrics::getDisplayType

Description

In BBj 5.0 and higher, this BBjSystemMetrics method returns a constant that indicates the type of display in use on the client.

Syntax

Return Value

Method

int

getDisplayType()

Parameters

None.

Return Value

0

MONOCHROME

1

GRAYSCALE_16

2

GRAYSCALE_256

3

COLOR_16

4

COLOR_256

5

COLOR_MORE

Remarks

None.

Example

rem 'return the client display type

rem 'Obtain the instance of the BBjAPI object
let myAPI! = BBjAPI()

rem 'Open the SysGui device
SYSGUI = UNT
OPEN (SYSGUI)"X0"

rem 'Obtain the instance of the BBjSysGui object
let mySysGui! = myAPI!.getSysGui()

rem 'Obtain the instance of the BBjSystemMetrics Object
let mySystemMetrics! = mySysGui!.getSystemMetrics()

rem 'Get display type
let myDisplayType = mySystemMetrics!.getDisplayType()

rem 'Report display type
print "Display type: ",
switch myDisplayType
    case mySystemMetrics!.MONOCHROME
        print "Monochrome"
        break
    case mySystemMetrics!.GRAYSCALE_16
        print "16 Grayscale"
        break
    case mySystemMetrics!.GRAYSCALE_256
        print "256 Grayscale"
        break
    case mySystemMetrics!.COLOR_16
        print "16 Color"
        break
    case mySystemMetrics!.COLOR_256
        print "256 Color"
        break
    case mySystemMetrics!.COLOR_MORE
        print "More than 256 Color"
        break
    case default
        print "Unknown:",myDisplayType
        break
swend

See Also

BBjAPI

BBjSysGui

Object Variables

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