MainFrm.pas
上传用户:psxgmh
上传日期:2013-04-08
资源大小:15112k
文件大小:1k
- unit MainFrm;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls;
- type
- TForm1 = class(TForm)
- btnShowModal: TButton;
- BtnShow: TButton;
- procedure btnShowModalClick(Sender: TObject);
- procedure BtnShowClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- //静态引入DLL中的方法
- procedure ShowDLLModalForm(aHandle: THandle); stdcall external '..5-1DLLShowForm.dll';
- procedure ShowDLLForm(aHandle: THandle); stdcall external '..5-1DLLShowForm.dll';
- var
- Form1: TForm1;
- implementation
- {$R *.dfm}
- //调用DLL里输出的ShowDLLModalForm方法,模式显示窗口
- procedure TForm1.btnShowModalClick(Sender: TObject);
- begin
- ShowDLLModalForm(Application.Handle);
- end;
- //调用DLL里输出的ShowDLLForm方法,非模式显示函数
- procedure TForm1.BtnShowClick(Sender: TObject);
- begin
- ShowDLLForm(Application.Handle);
- end;
- end.