A
apand
Unregistered / Unconfirmed
GUEST, unregistred user!
我想用下面的代码实现倒数数的功能(从533倒数到零),可是运行之后却什么也没有看到,不知道为什么,帮帮菜鸟我吧
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Timer1: TTimer;
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
i:integer;
implementation
{$R *.dfm}
procedure TForm1.Timer1Timer(Sender: TObject);
begin
i:=553;
for i:=553 to 0 do
begin
label1.Caption:=inttostr(i);
end;
i:=i-1;
end;
end.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Timer1: TTimer;
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
i:integer;
implementation
{$R *.dfm}
procedure TForm1.Timer1Timer(Sender: TObject);
begin
i:=553;
for i:=553 to 0 do
begin
label1.Caption:=inttostr(i);
end;
i:=i-1;
end;
end.