不知道为什么。我调用出来的DLL窗体。名称和图标不是跟主程序一样的。并且我如果用showmodal就会卡住主程序,必须关掉它主程序才能用。如果用show直接一闪就没有了。
  我是用DLL调用DLL的方式。  主程序运行。调用DLL。1里面有一个过程,是调用DLL2的代码如下。DLL2的代码library Project2;{ Important note about DLL memory management: ShareMem must be the
  first unit in your library's USES clause AND your project's (select
  Project-View Source) USES clause if your DLL exports any procedures or
  functions that pass strings as parameters or function results. This
  applies to all strings passed to and from your DLL--even those that
  are nested in records and classes. ShareMem is the interface unit to
  the BORLNDMM.DLL shared memory manager, which must be deployed along
  with your DLL. To avoid using BORLNDMM.DLL, pass string information
  using PChar or ShortString parameters. }uses
  SysUtils,
  Classes,
  Forms,
  Unit1 in 'Unit1.pas',
  Unit2 in 'Unit2.pas' {Form2};
    procedure   SetApplication(mHandle:   THandle);   
  begin   
      Application.Handle   :=   mHandle;   
  end;
  procedure ShowTest();stdcall;
  var f:TForm2;beginf:=TForm2.Create(nil);
SetApplication(Application.Handle);
try   f.Showmodal;finally   f.Free;end;end;
{$R *.res}
  //Exports ShowDllForm;
     Exports      ShowString;
  Exports   ShowTest;
beginend.
我想要的结果是。主程序和DLL窗体能同时使用并存在。最好有释放DLL的方法。才学DLL窗体不明白的太多。还有。如果是主程序调的DLL窗体。那DLL窗体不是应该算做主程序的进程吗?为什么我caption和图标跟主程序不一样?