home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / DELPHI / HTMLVIEW.ZIP / DEMOSRC.ZIP / HTMLABT.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-01-24  |  909 b   |  47 lines

  1. unit Htmlabt;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, StdCtrls, Buttons, Htmlview, ExtCtrls;
  8.  
  9. type
  10.   TAboutBox = class(TForm)
  11.     BitBtn1: TBitBtn;
  12.     Panel1: TPanel;
  13.     Viewer: THTMLViewer;
  14.     procedure FormCreate(Sender: TObject);
  15.   private
  16.     { Private declarations }
  17.   public
  18.     { Public declarations }
  19.   end;
  20.  
  21. var
  22.   AboutBox: TAboutBox;
  23.  
  24. implementation
  25.  
  26. {$R *.DFM}
  27. const
  28.   S: string =
  29.     '<body bgcolor="ffffc0" text="000080">'+
  30.     '<center>'+
  31.     '<h1>HTMLDemo</h1>'+
  32.     'A demo program for the ThtmlViewer component'+
  33.  
  34.     '<h3>Version 3.0</h3>'+
  35.     '</center>'+
  36.     '</body>';
  37.  
  38. procedure TAboutBox.FormCreate(Sender: TObject);
  39. begin
  40. Viewer.LoadFromBuffer(@S[1], Length(S));
  41. Viewer.DefFontName := 'MS Sans Serif';
  42. Viewer.DefFontSize := 9;
  43. Viewer.DefFontColor := clNavy;
  44. end;
  45.  
  46. end.
  47.