程序如下:
1.DLL窗体
unit DLLfrm:
interface
uses
......
function showfrm(AHandle:THandle
ACaption:String);
rmdint;stdCall;
procedure Closefrm(FrmRef:int);stdcall;
......
function showfrm(AHandle:THandle
ACaption:String):int;
var
Dllfrm:TDllForm;
begin
application.Handle:=Ahandle;
Dllfrm:=TDllform.Create(application);
result:=int(Dllfrm);
Dllfrm.Caption:=ACation
Dllfrm.show;
end;
procedure Closefrm(frmbef:int);
begin
if frmref>0 then
TDllform(frmref).Release;
end;