DisplayHeight

From Liberty BASIC Family
Jump to navigation Jump to search
Supported in Just BASIC Supported in Liberty BASIC Not supported in Liberty BASIC 5 Not supported in Run BASIC

Description

This is a special variable. It holds the height of the display screen (in pixels), which is obtained from the computer system. The value is available to be used in expressions and calculations involving the size and location of a program's windows.

Usage

WindowHeight = DisplayHeight

Hints

Centering a Program Window To center a window on the display height, use this expression:
UpperLeftY = int((DisplayHeight-WindowHeight)/2)

Example

    print "Screen width is ";DisplayWidth
    print "Screen height is ";DisplayHeight

Useful Procedures

' Place a useful function using this keyword here