type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
SpinEdit1: TSpinEdit;
Memo1: TMemo;
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
procedure SystemAbout(Title, Content:String); StdCall;
function InCrease(MyValue:Integer):Integer; StdCall;
implementation
procedure SystemAbout; External 'ABOUT2.DLL'
name 'SystemAbout';
function InCrease; external 'ABOUT2.DLL' name 'InCrease';
{$R *.DFM}
procedure TForm1.Button2Click(Sender: TObject);
var
i, j: Integer;
NowValue: Integer;
AddStr: String;
begin
Memo1.Clear;
j := SpinEdit1.Value;
for i:= 0 to 300 do
begin
NowValue := InCrease(j+i);
AddStr := IntToStr(NowValue);
Memo1.Lines.Add(AddStr);
end;
end;
unit CallDll2;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Spin;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
SpinEdit1: TSpinEdit;
Memo1: TMemo;
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
procedure SystemAbout(Title, Content:String); StdCall;
function InCrease(MyValue:Integer):Integer; StdCall;
implementation
procedure SystemAbout; External 'ABOUT2.DLL'
name 'SystemAbout';
function InCrease; external 'ABOUT2.DLL' name 'InCrease';
{$R *.DFM}
procedure TForm1.Button2Click(Sender: TObject);
var
i, j: Integer;
NowValue: Integer;
AddStr: String;
begin
Memo1.Clear;
j := SpinEdit1.Value;
for i:= 0 to 300 do
begin
NowValue := InCrease(j+i);
AddStr := IntToStr(NowValue);
Memo1.Lines.Add(AddStr);
end;
end;
end.
-------------
unit WMain;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, FileCtrl, ExtCtrls, Spin;
type
TWatchForm = class(TForm)
Panel1: TPanel;
PaintBox1: TPaintBox;
AMPMBox: TFilterComboBox;
HourEdit: TSpinEdit;
MinEdit: TSpinEdit;
SecEdit: TSpinEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
TimeSet1: TButton;
CancelBtn: TButton;
ChangeBtn: TButton;
Timer1: TTimer;
private
{ Private declarations }
public
{ Public declarations }
end;
var
WatchForm: TWatchForm;
implementation
{$R *.DFM}
end.