📄 dllfrm.pas
字号:
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.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -