//入口函数
function Entry(iFuncID: integer): TForm; stdcall; export;
begin
case iFuncID of
1: begin
if frmFinancing = nil then
frmFinancing := TfrmFinancing.Create(Application)
else
frmFinancing.Show;
Result := frmFinancing;
end;
end;
//frmFinancing是要创建的子窗体变量
同时设置编译属性为Build with runtime packages即可
function GetColor(col:LongInt):LongInt;
begin
try
FormScroll:=TForm1.Create(Application);
with FormScroll do
begin
//init some data
if ShowModal = mrOK then
//set your return data
end;
finally
FormScroll.Free;
end;
Except
On E:Exception do
ShowMessage('Error in Form DLL');
end;