frm_menuprincipal.pas

来自「Read resoude from DLL file, functions, p」· PAS 代码 · 共 64 行

PAS
64
字号
unit Frm_MenuPrincipal;

interface

uses

Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, XPMan;

type

TForm_MenuPrincipal = class(TForm)
  Label1: TLabel;
  Label2: TLabel;
  Button1: TButton;
  Edit1: TEdit;
  Edit2: TEdit;

  XPManifest1: TXPManifest;
  Button2: TButton;

  procedure Button1Click(Sender: TObject);
  procedure Button2Click(Sender: TObject);

private
{ Private declarations }
public
{ Public declarations }

end;

var
Form_MenuPrincipal: TForm_MenuPrincipal;

implementation

{$R *.DFM}
//******************************************************************************

function Max(a, b : double):double;external 'MaxDLL';

//******************************************************************************

procedure TForm_MenuPrincipal.Button1Click(Sender: TObject);
var
x, y, resultado : double;
begin
x := StrToFloat(Edit1.Text);
y := StrToFloat(Edit2.Text);
resultado := Max(x,y);
ShowMessage('Valor M醲imo ' +FloatToStr(resultado));
end;

//******************************************************************************

procedure TForm_MenuPrincipal.Button2Click(Sender: TObject);
begin
Application.Terminate;
end;

//******************************************************************************

end.

⌨️ 快捷键说明

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