home *** CD-ROM | disk | FTP | other *** search
- {
- *******************************************************************************
-
- Test program for Save Screen Unit Version 1
-
- Steve Trace
- CompuServe ID 70317,2124
-
- This program is a simple example of the possible uses to the Save Screen
- Unit Version 1.
-
- *******************************************************************************}
-
- uses crt, dos, savescr1;
-
- const
- notice = ' Press any key to continue.';
-
- var
- i : byte;
-
- procedure waitForAnyKey;
-
- var
- c : char;
-
- begin
- repeat until keypressed;
- c := readkey;
- end;
-
- begin
- textAttr := $1f;
- clrscr;
- writeln('First Window!',notice);
- saveScr(1);
- waitForAnyKey;
- window(5,5,75,20);
- textAttr := $4f;
- clrscr;
- writeln('Second Window',notice);
- saveScr(2);
- waitForAnyKey;
- window(10,10,70,15);
- textAttr := $2f;
- clrscr;
- writeln('Third Window',notice);
- saveScr(3);
- waitForAnyKey;
- window(20,12,60,14);
- textAttr := $0f;
- clrscr;
- write('Fourth Window',notice);
- saveScr(4);
- waitForAnyKey;
- restoreScr(3);
- writeln('Back to third window!',notice);
- waitForAnyKey;
- restoreScr(2);
- writeln('Back to second window!',notice);
- waitForAnyKey;
- restoreScr(1);
- writeln('Back to first window!');
- writeln;
- writeln('SAVESCR1''s exit procedure will automatically restore the start up screen.');
- writeln;
- writeln(notice);
- waitForAnyKey;
- end.