library About;
uses
SysUtils,
Classes,
CreatAboutUnit in 'unit1.pas';
exports
CreatAbout Index 1 name 'CreatAbout',
==================================
Unit unit1;
Interface
Uses
Windows, Messages, SysUtils, Classes, Graphics, Forms;
Type
TFormAbout = Class(TForm)
Private
{ Private declarations }
Public
{ Public declarations }
End;
Function CreatAbout (FormHandle : THandle
: Boolean; stdcall;
Var
FormAbout : TFormAbout;
Implementation
{$R *.DFM}
Function CreatAbout(FormHandle : THandle
: Boolean;
Begin
.......
End;
End.
=====================================================
主程序
function CreatAbout(FormHandle : THandle
:THandle;stdcall;
external 'About.dll' name 'CreatAbout';
^^^^^^^^^^假设是这个DLL名字
...........
procedure TForm1.button1Click(Sender: TObject);
begin
CreatAbout(Form1.handle);
end;