home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TP_ADV.ZIP / LIST0908.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1989-11-17  |  908 b   |  36 lines

  1. Program WindDemo;
  2.  
  3. Uses
  4.   Crt,
  5.   WindTool;
  6.  
  7. Var
  8.   ch : char;
  9.   i,
  10.   j : Integer;
  11.   xSize,
  12.   ySize,
  13.   xStart,
  14.   yStart : Byte;
  15.  
  16. Begin
  17.   Randomize;
  18.   ClrScr;
  19.   For i := 1 to 100 Do
  20.   Begin
  21.     xSize  := Random ( 50 ) + 3;  { Size of window in X direction }
  22.     ySize  := Random ( 20 ) + 3;  { Size of window in Y direction }
  23.     xStart := Random ( 79 - xSize ) + 1; { Upper left X location of window }
  24.     yStart := Random ( 25 - ySize ) + 1; { Upper left Y location of window } 
  25.     OpenWindow ( xStart, yStart, xStart + xSize, yStart + ySize,
  26.                  Random ( 4 ) + 1, ( ( Random ( 8 ) ) shl 8 ) +
  27.                  Random ( 16 ), 'Test window:test window' );
  28.     For j := 1 to 10 do
  29.       Writeln ( i, 'This is a test, this is only a test...' );
  30.   End;
  31.   ch := ReadKey;  { Wait until a key has been pressed }
  32.   For i := 1 to 100 Do
  33.     CloseWindow;
  34.   ReadLn;
  35. End.
  36.