home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / SAVESCR1.ZIP / SAVETEST.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1988-01-28  |  1.5 KB  |  69 lines

  1.                                                                                {
  2. *******************************************************************************
  3.  
  4.    Test program for Save Screen Unit Version 1
  5.  
  6.    Steve Trace
  7.    CompuServe ID 70317,2124
  8.  
  9.    This program is a simple example of the possible uses to the Save Screen
  10.    Unit Version 1.
  11.  
  12. *******************************************************************************}
  13.  
  14. uses crt, dos, savescr1;
  15.  
  16. const
  17.    notice = '  Press any key to continue.';
  18.  
  19. var
  20.    i : byte;
  21.  
  22. procedure waitForAnyKey;
  23.  
  24.    var
  25.      c : char;
  26.  
  27.    begin
  28.       repeat until keypressed;
  29.       c := readkey;
  30.    end;
  31.  
  32. begin
  33.    textAttr := $1f;
  34.    clrscr;
  35.    writeln('First Window!',notice);
  36.    saveScr(1);
  37.    waitForAnyKey;
  38.    window(5,5,75,20);
  39.    textAttr := $4f;
  40.    clrscr;
  41.    writeln('Second Window',notice);
  42.    saveScr(2);
  43.    waitForAnyKey;
  44.    window(10,10,70,15);
  45.    textAttr := $2f;
  46.    clrscr;
  47.    writeln('Third Window',notice);
  48.    saveScr(3);
  49.    waitForAnyKey;
  50.    window(20,12,60,14);
  51.    textAttr := $0f;
  52.    clrscr;
  53.    write('Fourth Window',notice);
  54.    saveScr(4);
  55.    waitForAnyKey;
  56.    restoreScr(3);
  57.    writeln('Back to third window!',notice);
  58.    waitForAnyKey;
  59.    restoreScr(2);
  60.    writeln('Back to second window!',notice);
  61.    waitForAnyKey;
  62.    restoreScr(1);
  63.    writeln('Back to first window!');
  64.    writeln;
  65.    writeln('SAVESCR1''s exit procedure will automatically restore the start up screen.');
  66.    writeln;
  67.    writeln(notice);
  68.    waitForAnyKey;
  69. end.