如何在*.dll文件中增加有个form1,在需要时显示这个表单?, form1.showmodal;?

解决方案 »

  1.   

    在dll里面新增form即可,和编写一般的应用程序工程一样。
    但是需要dll暴露接口出来。供外面的程序调用即可。
      

  2.   

    用向导生成一个
    library Testuses
      System,SysUtils,Classes................;
      Unit1 'Unit1 .pas' {Form1};{$R *.res}
    exports
      CallFormModule;
    begin
    end;然后new一个form,在此form中建一个函数 
    procedure CallFormModule(piFlag:Integer);
    begin
      Application.CreateForm(Tform1,form1);
      try
         Form1.showmodal;
      finally
         Form1.free;
      end; 
    end;
      

  3.   

    《Delphi 5开发人员指南》
    第9章   动态链接库 234
    9.4.2   显示DLL中的模式窗体 239
    9.5   显示DLL中的无模式窗体 241