home *** CD-ROM | disk | FTP | other *** search
/ Delphi 2.0 - Programmer's Utilities Power Pack / Delphi 2.0 Programmer's Utilities Power Pack.iso / a_to_d / dll101 / aboutbox.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-09-15  |  951 b   |  42 lines

  1. unit Aboutbox;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.   private
  12.     { Private declarations }
  13.   public
  14.     { Public declarations }
  15.   end;
  16.  
  17. var
  18.   Form1: TForm1;
  19.  
  20. {*Add this line of code}
  21. procedure LoadOurAboutbox(Handle: THandle); export; {*We created this-
  22.                procedure and gave it the export directive}
  23.  
  24. implementation
  25.  
  26. {$R *.DFM}
  27.  
  28. {*Add the following lines of code}
  29. procedure LoadOurAboutbox(Handle: THandle); {*Our procedure}
  30. begin
  31.   Application.Handle := Handle; {*Delphi default application calling}
  32.   Form1:= TForm1.Create(Application); {*Create the Aboutbox}
  33.   try                  {*Delphi reserved word}
  34.     Form1.ShowModal;   {*Try and make the Aboutbox modal}
  35.   finally              {*Finally, or "make sure"}
  36.     Form1.Free;        {*Unload the instance of our Aboutbox}
  37.   end;
  38. end;
  39.  
  40. end.
  41.  
  42.