Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Window Procedure
◄Summary► ◄Details► ◄Example► ◄Back►
Argument
x1, y1 Column and row coordinates for the upper-left corner
x2, y2 Column and row coordinates for the lower-right corner
Description
The Window procedure sets the current window to new coordinates
and moves the cursor to the upper-left position in the new
window.
The coordinates are positive integer values relative to the screen
display, not the current window. The coordinates for the maximum
window (the full screen) depend on the number of columns and rows
in the current mode for text display. The TextMode procedure sets
the text mode.
Mode Size Maximum Coordinates
═════════ ═══════════════════
40 x 25 ( 1, 1, 40, 25 )
40 x 43 ( 1, 1, 40, 43 )
40 x 50 ( 1, 1, 40, 50 )
80 x 25 ( 1, 1, 80, 25 )
80 x 43 ( 1, 1, 80, 43 )
80 x 50 ( 1, 1, 80, 50 )
In any mode, the point (1,1) refers to the upper-left corner of a
window. A window can be made as small as one row by one column.
Window ignores the call if the arguments are not valid coordinates.
After Window sets the coordinates, the following routines operate
relative to the new window:
ClrEol ║ Readln
ClrScr ║ WhereX
DelLine ║ WhereY
GotoXY ║ Write
Insline ║ Writeln
Read ║
The variables WindMin and WindMax, defined in the Crt unit, always
contain the current window coordinates relative to the full screen.
The stored coordinates may be the default coordinates or may be set
by a prior call to Window.
Writing to the new window overwrites any previously written text
within the new window. When new lines are added to the bottom of
the window, all text within the window scrolls upward. Text
scrolling off the top of the window is lost. Text outside of the
window is undisturbed.