Dimension

Specifies a comma-separated string that defines the position and size of the form window in pixels.

newinstance"A_FORM", "MyInstance","Dimension = XPos, YPos, XSize,YSize"

Arguments Description
XPos The horizontal window position, relative to the parent window.
YPos The vertical window position, relative to the parent window.
XSize Width of the window size.
YSize Height of the window

Description

You can set the Dimension window property when creating a new instance of a Form component. For example, the following statement starts a display-only form instance that is 235 pixels wide and 400 pixels high:

$1 = $1 + 1
newinstance "MYFORM", "MYFORM%%$1", "DISPLAY=TRUE;DIMENSION=0,0,235,400"

Note:  To have Windows handle positioning, set both XPos and YPos to 0 for all forms. When multiple forms are displayed, Windows stacks them in an offset cascade, with each form displayed one position below and to the right of the previous form. If there are very many open forms the stack continues to the bottom of the application window and begins again at top left position.

You can use the $windowproperties ProcScript function to get or set the window position and size of a form instance at runtime. In this case, you must explicitly define the properties XPos, YPos, XSize, and YSize rather than defining the dimension property. For more information, see $windowproperties.

Applies To