ShowForm是Dll中export的一方法
主要实现是建立一子窗体frmChildren,并且把子窗体上的工具条放到父窗体上
ParentForm:父窗体 fsMDIForm
frmChildren:子窗体 fsChildForm
procedure ShowForm(ParentApplication: TApplication;ParentForm: TForm);
var
frm : TfrmChildren;
ptr:PLongInt;
begin
  ptr:=@(Application.MainForm);
  ptr^:=LongInt(PF);
  frm := TfrmChildren.Create(nil);
  //frm.tb.Parent := ParentForm;   为何此条语句报错 cannot assign a TFont to a TFont
  frm.Show;
end;

解决方案 »

  1.   

    能把toolbar的父窗体设置成其他的Form, 这个搞法强...又见识到新招..
      

  2.   

    procedure ShowForm(ParentApplication: TApplication;ParentForm: TForm);
    var
    frm : TfrmChildren;
    ptr:PLongInt;
    begin
      ptr:=@(Application.MainForm);//这句有什么用呀?建议删掉
      ptr^:=LongInt(PF);//这句有什么用呀?建议删掉
      frm := TfrmChildren.Create(nil);
      //frm.tb.Parent := ParentForm;   为何此条语句报错 cannot assign a TFont to a TFont
      frm.Parent := ParentForm;//上句建议改成这样
      frm.Show;
    end;