Skip to content

Desktop

Narta Xaymar Dirks edited this page Oct 31, 2026 · 9 revisions
BlitzPlus

Desktop

Desktop:Int32

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 windows of the operating system on the desktop of the computer, whose size ClientWidth and ClientHeight tell. Nothing can be drawn on or read from the desktop of the computer, see DesktopBuffer. A program needs no Graphics call for this. On a display with a high density of pixels the desktop is in the units of the program, which are fewer than the pixels of the display: a display of 1920 by 1080 pixels at 150 % is a desktop of 1280 by 720, see CreateWindow. Where no window can be made, the windows are drawn inside the window of Graphics (1024 by 768 where the program did not ask for one) and cannot leave it.

Examples

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



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally