home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l043 / 3.ddi / SETBKCOL.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1987-11-02  |  420 b   |  22 lines

  1. uses
  2.   Crt, Graph;
  3. var
  4.   GraphDriver, GraphMode : integer;
  5.   Palette : PaletteType;
  6. begin
  7.   GraphDriver := Detect;
  8.   InitGraph(GraphDriver,GraphMode,'');
  9.   Randomize;
  10.   if GraphResult <> grOk then
  11.     Halt(1);
  12.   GetPalette(Palette);
  13.   repeat
  14.     if Palette.Size <> 1 then
  15.       SetBkColor(Random(Palette.Size));
  16.     LineTo(Random(GetMaxX),Random(GetMaxY));
  17.   until KeyPressed;
  18.   CloseGraph;
  19. end.
  20.  
  21.  
  22.