WindowBounds()

Syntax

WindowBounds(#Window, MinimumWidth, MinimumHeight, MaximumWidth, MaximumHeight)
Description
Changes the minimal and maximal #Window dimensions (in pixels). This is useful to prevent a window from becoming too small or too big when the user resizes it.

Parameters

#Window The window to use.
MinimumWidth The minimum width of the window. If sets to #PB_Ignore, the current minimum width value is not changed. If sets to #PB_Default, the minimum width value is reset to the system default (as it was before calling this command).
MinimumHeight The minimum height of the window. If sets to #PB_Ignore, the current minimum height value is not changed. If sets to #PB_Default, the minimum height value is reset to the system default (as it was before calling this command).
MaximumWidth The maximum width of the window. If sets to #PB_Ignore, the current maximum width value is not changed. If sets to #PB_Default, the maximum width value is reset to the system default (as it was before calling this command).
MaximumHeight The maximum height of the window. If sets to #PB_Ignore, the current maximum height value is not changed. If sets to #PB_Default, the maximum height value is reset to the system default (as it was before calling this command).

Return value

None.

Example

  If OpenWindow(0, 0, 0, 300, 300, "Resize me !", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget)
    WindowBounds(0, 200, 200, 400, 400)
  EndIf

Supported OS

All

<- UnbindEvent() - Window Index - WindowHeight() ->