Skip to content

Desktop

Claude edited this page Oct 27, 2026 · 10 revisions
BlitzPlus

Desktop

Command Syntax

Desktop:Int32

Parameters

Returns: A handle that stands for the desktop.

Description

Gives the handle of the desktop, the group that top level windows live in. Pass it as the group of CreateWindow. Windows without a group are always on it. With ClientWidth and ClientHeight it tells the size of the primary display. DesktopBuffer does nothing here.

Differences

  • The windows are drawn in the program's own window, which has the size you gave Graphics, even though ClientWidth and ClientHeight tell the size of the primary display, with the area under the task bar and start menu. Windows cannot be placed outside of the program's window. Nothing can be drawn on or read from the desktop of the computer, see DesktopBuffer.

Examples

Graphics 320, 240, 32, 2
win = CreateWindow("Centered", 0, 0, 180, 100, Desktop(), 15)
SetGadgetShape win, (ClientWidth(Desktop()) - 180) / 2, (ClientHeight(Desktop()) - 100) / 2, 180, 100
Repeat
Until WaitEvent() = $803

Related Commands

ClientWidth, CreateWindow, MaximizeWindow, MinimizeWindow

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally