The WITH FORM clause

Creating a window object with a form.

As an alternative to specifying explicit dimensions for a window, the WITH FORM clause can specify the name of a compiled form file, without the .42f file extension. A window object is automatically opened and sized to the screen layout of the form. When using the TUI mode, the width of the window is from the left-most character on the screen form (including leading blank spaces) to the right-most character on the screen form (truncating trailing blank spaces). The length of the window is calculated as (form line) + (form length).
OPEN WINDOW w1 WITH FORM "custlist"

It is recommended that you use the WITH FORM clause, especially in the default GUI mode, because the window is created in accordance with the form. If you use this clause, you do not need the OPEN FORM, DISPLAY FORM, or CLOSE FORM statement to open and close the form. The CLOSE WINDOW statement closes the window and the form.