Previous: 4.8.2.23. WhereY function To the Table of Contents Next: 4.8.2.25. WriteAttr procedure
4.8.2.23. WhereY function Table of Contents 4.8.2.25. WriteAttr procedure

- 4.8.2.24. -
Table of Contents
4. Standard Units
4.8. CRT - Keyboard and monitor control routines
4.8.2. CRT Unit Procedures and Functions
4.8.2.24. Window procedure


4.8.2.24. 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: 4.8.2.23. WhereY function To the Table of Contents Next: 4.8.2.25. WriteAttr procedure
4.8.2.23. WhereY function Table of Contents 4.8.2.25. WriteAttr procedure

- 4.8.2.24. -