DLLFrm.pas
上传用户:psxgmh
上传日期:2013-04-08
资源大小:15112k
文件大小:1k
- unit DLLFrm;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs;
- type
- TfrmDLL = class(TForm)
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- {声明要引出的方法}
- procedure ShowDLLModalForm(aHandle: THandle); stdcall; //模式显示窗口
- procedure ShowDLLForm(aHandle: THandle); stdcall; //非模式显示窗口
- implementation
- {$R *.dfm}
- //模式显示窗口
- procedure ShowDLLModalForm(aHandle: THandle);
- begin
- Application.Handle := aHandle; //传递应用程序句柄
- with TfrmDLL.Create(Application) do //创建窗体
- begin
- try
- ShowModal; //模式显示窗体
- finally
- free;
- end;
- end;
- end;
- //非模式显示窗口
- procedure ShowDLLForm(aHandle: THandle);
- begin
- Application.Handle := aHandle; //传递应用程序句柄
- with TfrmDLL.Create(application) do //创建窗体
- Show; //非模式显示窗体
- end;
- end.