T
tengjian1981
Unregistered / Unconfirmed
GUEST, unregistred user!
我在DLL程序中写了一个过程:
procedure OpenForm(mainForm:TForm;DS:Tdataset);stdcall;
var
Form1: TForm;
ptrLongInt;
QuickRep1: TQuickRep;
begin
ptr:=@(Application.MainForm);
ptr^:=LongInt(mainForm);
Form1:=TForm.Create(mainForm);
QuickRep1:=TQuickRep.CreateParented();
QuickRep1:=TQuickRep.Create(Form1);
QuickRep1.DataSet:=DS;
QuickRep1.ReportTitle:='DLL';
QuickRep1.Zoom:=100;
QuickRep1.PreviewModal;
end;
但是在另外的程序中调用是提示“Control '' has no parent window”
而我把这个过程直接写在程序中,不用通过DLL来调用就不报错!
望高手来赐教,在线等
procedure OpenForm(mainForm:TForm;DS:Tdataset);stdcall;
var
Form1: TForm;
ptrLongInt;
QuickRep1: TQuickRep;
begin
ptr:=@(Application.MainForm);
ptr^:=LongInt(mainForm);
Form1:=TForm.Create(mainForm);
QuickRep1:=TQuickRep.CreateParented();
QuickRep1:=TQuickRep.Create(Form1);
QuickRep1.DataSet:=DS;
QuickRep1.ReportTitle:='DLL';
QuickRep1.Zoom:=100;
QuickRep1.PreviewModal;
end;
但是在另外的程序中调用是提示“Control '' has no parent window”
而我把这个过程直接写在程序中,不用通过DLL来调用就不报错!
望高手来赐教,在线等