home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mega CD-ROM 1
/
megacd_rom_1.zip
/
megacd_rom_1
/
MAGAZINE
/
INSIDE_T
/
ITPAUG90.ZIP
/
LETTER.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1990-06-20
|
1KB
|
56 lines
{ This program tests the hint of incrementing
the WindMax variable before writing to the lower
right corner-location (80,25). This suppresses
the annoying scroll that normally occurs in that
location. Submitted by Paul D. Hanus}
PROGRAM Hint;
USES
Crt;
PROCEDURE Border(X1,Y1,X2,Y2 : Byte);
VAR
I : Byte;
NRows : Byte;
NColumns : Byte;
BEGIN
NColumns := X2 - X1 + 1;
NRows := Y2 - Y1 + 1;
Window(X1,Y1,X2,Y2);
GotoXY(1,1); Write(#201); { upper left }
GotoXY(1,NRows); Write(#200); { lower left }
GotoXY(NColumns,1); Write(#187); { upper right }
{ start trick here to write lower right}
Inc(WindMax);
GotoXY(NColumns,NRows); Write(#188);
{ reset so normal scrolling can occur }
Dec(WindMax);
FOR I := 2 TO (NColumns - 1) DO
BEGIN
GotoXY(I,1); Write(#205);
GotoXY(I,NRows); Write(#205);
END;
FOR I := 2 TO (NRows - 1) DO
BEGIN
GotoXY(1,I); Write(#186);
GotoXY(NColumns,I); Write(#186);
END;
END;
VAR
J : Byte;
BEGIN
ClrScr;
Border(1,1,80,25);
Border(2,2,78,24);
Border(10,13,50,16);
Window(1,1,80,25);
FOR J := 1 TO 25 DO
BEGIN
GotoXY(4,J);Write(J:2)
END;
Write(' Press Enter to quit.');
ReadLn;
END.