Previous: WhereY function To the Table of Content Next: WriteAttr procedure

- 4.8.3.14 -
Standard Units
Crt Unit
CRT Unit Procedures and Functions

Window procedure

Targets: MS-DOS, OS/2, Win32 console


CRT Unit

Defines a text window on the screen.

Declaration:
procedure Window (X1, Y1, X2, Y2: Byte);
Remarks:
X1 and Y1 are the coordinates of the upper left corner of the window, and X2 and Y2 are the coordinates of the lower right corner. The upper left corner of the screen corresponds to (1, 1). The minimum size of a text window is one column by one line. If the coordinates are invalid in any way, the call to Window is ignored.

The default window is (1, 1, 80, 25) in 25-line mode, and (1, 1, 80, 43) in 43-line mode, corresponding to the entire screen.

All screen coordinates (except the window coordinates themselves) are relative to the current window. For instance,
  GotoXY(1, 1)
will always position the cursor in the upper left hand corner of the current window.

Many CRT procedures and functions are window-relative, including ClrEOL, ClrScr, DelLine, GotoXY, InsLine, WhereX, WhereY, Write and WriteLn. WindMin and WindMax store the current window definition. A call to the Window procedure always moves the cursor to (1, 1).


Previous: WhereY function To the Table of Content Next: WriteAttr procedure
WhereY function Table of Content WriteAttr procedure

- 4.8.3.14 -