Adjusts the window/Form size based on the given window client area.
AdjustW wh, w, h
Form.Adjust w, h
wh, w ,h:integer expression
A Windows window is composed of a number of elements (scroll bars, close box, minimize box, window client area, window rectangle, ...), which determine the window appearance and, as a rule, are used by Windows. An application program must simply configure the window with various attributes.
The point of reference for window manipulation, such as size change, is frequently the window client area. The GFA-BASIC command AdjustW and the Form method Adjust change the dimensions of the window. Two parameters are used for this purpose: the first specifies the width and the second the height of the client area in pixels.
OpenW # 1, 10, 10, 400, 300, -1
Print "Press key to adjust Window"
Do : Sleep : Until Win_1 Is Nothing
Sub Win_1_KeyPress(Ascii&)
AdjustW 1, 200, 150
' or Me.Adjust 200, 150
' or Win_1.Adjust 200, 150
Cls : Print "Close Window"
EndSub
Changes the window size so that the work area becomes 200 pixels wide and 150 pixels high.
AdjustW corresponds to the Windows function AdjustWindowRect().
Form, SizeW, MoveW, GetWinRect
{Created by Sjouke Hamstra; Last updated: 23/09/2014 by James Gaite}