CRT Documentation: Reference |
[This procedure has changed from its original DOS version.]
Defines a text window on the screen.
procedure Window( X1, Y1, X2, Y2: integer );
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, (1, 1, 80, 43) in 43-line mode, and (1, 1, 80, 50) in 50-line mode, corresponding to the entire screen. If a non-standard screen size is encountered, the default window is such that it encompasses 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 corner of the current window.
Many Crt procedures and functions are window-relative, including ClrEol, ClrScr, DelLine, GotoXY, InsLine, WhereX, WhereY, Read, ReadLn, Write, WriteLn.
WindMin and WindMax store the current window definition.
A call to the Window procedure always moves the cursor to (1, 1).
This Delphi version of Window takes integers instead of bytes for parameters.
Crt Overview, ClrEol, ClrScr, DelLine, GotoXy, WhereX, WhereY