在dll中的窗体需要由你的程序窗体application 来维护吧~~不过组件不能显示的情况的确没碰到过。

解决方案 »

  1.   

    在dll中的窗体需要由你的程序传递application 来维护吧~~不过组件不能显示的情况的确没碰到过。
      

  2.   

    我传递了Application了啊。还是不行的
      

  3.   

    你可以在依照下面的代码写dll中:procedure showmyform(handle:Thandle);
    var
     savehandle:Thandle;
    begin
      savehandle:=handle;
      application.handle:=handle;
      form2:=Tform2.create(application);
     try
      form2.showmodal;
     finally
      form2.free;
      application.handle:=savehandle;
    end;
    Application 中:
       
    procedure showdllForm
    begin
      showmyform(application.handle);
    end;