Skip to content

SetWindowSizeLimit

Narta Xaymar Dirks edited this page Nov 25, 2026 · 1 revision

SetWindowSizeLimit

SetWindowSizeLimit:Void window:Int32, min_width:Int32, min_height:Int32, max_width:Int32, max_height:Int32
Parameter Mode Type Default Description
window In Int32 required Handle of a window that can be resized.
min_width In Int32 required Smallest width, 0 for no limit.
min_height In Int32 required Smallest height, 0 for no limit.
max_width In Int32 required Biggest width, 0 for no limit.
max_height In Int32 required Biggest height, 0 for no limit.

Description

A BlitzLLVM extension: sets how small and how big the user may make a window. Windows holds the window to these sizes while the user drags an edge, and SetGadgetShape keeps to them as well. A size of 0 means no limit there. It replaces what SetMinWindowSize set.

Differences

  • Not in the original, which only has SetMinWindowSize and lets a window grow as big as the desktop. A program there that keeps a window smaller has to shrink it back after the user resized it.

Examples

Graphics 320, 240, 32, 2
win = CreateWindow("Only wider", 20, 20, 240, 160, Desktop(), 15)
SetWindowSizeLimit win, 160, 160, 480, 160 ; Between 160 and 480 wide, always 160 high.
Repeat
Until WaitEvent() = $803

Related Commands

ActivateWindow, ActiveWindow, CreateWindow, MaximizeWindow, MinimizeWindow, RestoreWindow, SetMinWindowSize, SetStatusText

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally