u_form1.~pas
来自「很好地delphi书籍源码」· ~PAS 代码 · 共 41 行
~PAS
41 行
unit U_Form1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
DateButton: TButton;
MoneyButton: TButton;
procedure DateButtonClick(Sender: TObject);
procedure MoneyButtonClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
function GetMyDateTime : TDateTime; stdcall; external 'FormDll.dll';
function GetMoney(T:Pchar):double; stdcall; external 'FormDll.dll';
implementation
{$R *.dfm}
procedure TForm1.DateButtonClick(Sender: TObject);
begin
Showmessage(DateTimeToStr(GetMyDateTime));
end;
procedure TForm1.MoneyButtonClick(Sender: TObject);
begin
Showmessage(Format('你输入的费用是:%10.2f ',[GetMoney('请核实你的费用?')]));
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?