dllform.pas

来自「特别方便的工具程序」· PAS 代码 · 共 54 行

PAS
54
字号
unit DllForm;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls;

type
  TDllForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    Panel1: TPanel;
    Edit1: TEdit;
    Edit2: TEdit;
    Label1: TLabel;
    Label2: TLabel;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var S: string;

function DLL01: Boolean; Export;
function PassWord: Boolean; Export;

implementation

{$R *.DFM}

function Dll01;
begin
  S := 'DLL 测试程序';
  Showmessage(S);
  MessageBox(0, '这是我的第一个DLL程序', '测试程序:', 0);
  Result := True;
end;

function PassWord;
var F: TDllForm1;
begin
  Showmessage(S);
  F := nil;
  with TDllForm1.Create(F) do begin
    Showmodal;
    Result := Showmodal = mrOK;
  end;
  F.free;
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?