home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / tot5.zip / EXTDEM4.PAS < prev    next >
Pascal/Delphi Source File  |  1991-02-11  |  1KB  |  56 lines

  1. Program ExtendedDemoFour;
  2. {EXTDEM4 - this program shows how to use the VirtualWinOBJ
  3.            object created in the unot EXTWIN. This demo
  4.            builds a virtual screen, and fills it with an
  5.            ASCII table.}
  6.  
  7. Uses DOS,CRT,
  8.      totINPUT, totFAST, totSTR, extWIN;
  9.  
  10. var
  11.    ASCIIdata: ScreenOBJ;
  12.    AscWin: VirtualWinOBJ;
  13.  
  14. procedure BuildASCIIscreen;
  15. {}
  16. var
  17.    I,J : integer;
  18.    Str:string;
  19. begin
  20.    with ASCIIdata do
  21.    begin
  22.       Init;
  23.       Create(65,32,71);
  24.       for I := 0 to 31 do      
  25.       begin
  26.          Str := '';
  27.          for J := 0 to 7 do
  28.          begin
  29.             Str := Str+' '+
  30.                    padright(inttostr(I+32*J),3,'0')+
  31.                    ' '+char(I+32*J)+' ';
  32.             if J <> 7 then
  33.                Str := Str + '│';
  34.          end;
  35.          WritePlain(1,succ(I),Str);
  36.       end;
  37.       for J := 0 to 7 do
  38.           Attrib(6+J*8,1,6+J*8,32,78);
  39.    end;      
  40. end; {BuildASCIIscreen}
  41.  
  42. begin
  43.    Screen.Clear(white,'░'); {paint the screen}
  44.    Key.SetFast;
  45.    BuildASCIIscreen;
  46.    with AscWin do
  47.    begin
  48.       Init;
  49.       SetTitle(' ASCII Table ');
  50.       AssignVirtualScreen(ASCIIdata);
  51.       Go;
  52.       ASCIIdata.Done;
  53.       Done;
  54.    end;
  55. end.
  56.