home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / pascal / amouse10.zip / DEMO.INC < prev    next >
Text File  |  1992-07-22  |  911b  |  54 lines

  1. procedure SetCursor(StartLine,EndLine:integer);
  2. { -Set Cursor Size}
  3. var r : registers;
  4. begin
  5.     with r do
  6.      begin
  7.        CH:=StartLine;
  8.        CL:=EndLine;
  9.        Ah:=1;
  10.        intr($10,r);
  11.     end;
  12. end;
  13.  
  14. procedure NormalCursor;
  15.     {-Set normal cursor }
  16.   begin
  17.     SetCursor(6,7);
  18.   end;
  19.  
  20. procedure HiddenCursor;
  21.     {-Set Hide cursor}
  22.   begin
  23.     SetCursor($20, 0);
  24.   end;
  25.  
  26. Procedure ATR(t,b : integer);
  27.     {-Set background and color}
  28. begin
  29.    Textcolor(t);
  30.    TextBackGround(b);
  31. end;
  32.  
  33. procedure Time;
  34.    {-Draw time}
  35. var
  36.   h, m, s, hund : Word;
  37. function LeadingZero(w : Word) : String;
  38. var
  39.   s : String;
  40. begin
  41.   Str(w:0,s);
  42.   if Length(s) = 1 then
  43.     s := '0' + s;
  44.   LeadingZero := s;
  45. end;
  46. begin
  47.   GetTime(h,m,s,hund);
  48.   gotoxy(70,1);
  49.   Write(LeadingZero(h),':',
  50.           LeadingZero(m),':',LeadingZero(s),
  51.           '.',LeadingZero(hund));
  52. end;
  53.  
  54.