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.