applicationform.pas
来自「三层开发,是基于的」· PAS 代码 · 共 52 行
PAS
52 行
unit ApplicationForm;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TfAppMain = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
fAppMain: TfAppMain;
implementation
{$R *.dfm}
procedure TfAppMain.Button1Click(Sender: TObject);
var
LDLLHandle: HModule;
LShowProc: TProcedure;
begin
LDLLHandle := LoadLibrary('TestDLL.dll');
if LDLLHandle <> 0 then
begin
try
LShowProc := GetProcAddress(LDLLHandle, 'ShowDLLForm');
if Assigned(LShowProc) then
begin
LShowProc;
end
else
ShowMessage('The ShowDLLForm procedure could not be found in the DLL.');
finally
FreeLibrary(LDLLHandle);
end;
end
else
ShowMessage('The DLL was not found. Please compile the DLL before running this application.');
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?