QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The _DESKTOPWIDTH function returns the width of the users current desktop.

Syntax

x& = _DESKTOPWIDTH

Description

Availability

Example(s)


s& = _NEWIMAGE(800, 600, 256)
SCREEN s&
PRINT _DESKTOPWIDTH, _DESKTOPHEIGHT
PRINT _WIDTH, _HEIGHT

Explanation: This will print the size of the user desktop (for example 1920, 1080 for a standard hdmi monitor), and then the size of the current SCREEN (800, 600).

See Also