📄 u_form1.~pas
字号:
unit U_Form1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Spin;
type
TForm1 = class(TForm)
SpinEdit1: TSpinEdit;
DoubleButton: TButton;
TripleButton: TButton;
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
procedure DoubleButtonClick(Sender: TObject);
procedure TripleButtonClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
function Double(N:integer):Integer; stdcall;external'FuncDll.dll';
function Triple(N:integer):Integer; stdcall;external'FuncDll.dll';
implementation
{$R *.dfm}
procedure TForm1.DoubleButtonClick(Sender: TObject);
begin
Edit1.Text:=Format('2*%d=%d',[SpinEdit1.Value,Double(SpinEdit1.Value)]);
end;
procedure TForm1.TripleButtonClick(Sender: TObject);
begin
Edit1.Text:=Format('3*%d=%d',[SpinEdit1.Value,Triple(SpinEdit1.Value)]);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -