⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unit1.~pas

📁 这是一个delphi程序! 在deiphi 6.0 中实现!
💻 ~PAS
字号:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls;

type
  TForm1 = class(TForm)
    Panel1: TPanel;
    Shape1: TShape;
    Shape2: TShape;
    Shape3: TShape;
    Panel2: TPanel;
    Timer1: TTimer;
    Label1: TLabel;
    Timer2: TTimer;
    Timer3: TTimer;
    procedure Timer1Timer(Sender: TObject);
    procedure Timer2Timer(Sender: TObject);
    procedure Timer3Timer(Sender: TObject);
  private
    { Private declarations }

  public
    { Public declarations }

  end;

var
  Form1: TForm1;
  s:integer = 1;
implementation

{$R *.dfm}


procedure TForm1.Timer1Timer(Sender: TObject);
begin
if label1.Caption<>'1'then
label1.Caption:=inttostr(strtoint(label1.Caption) - 1)
else
begin
shape3.Brush.Color:=clsilver;
shape2.Brush.Color:=clyellow;
timer2.Enabled:=true;
timer1.Enabled:=false;
label1.Caption:='5';
end;
end;

procedure TForm1.Timer2Timer(Sender: TObject);
begin
if label1.Caption<>'1'then
label1.Caption:=inttostr(strtoint(label1.Caption) - 1)
else
begin
shape2.Brush.Color:=clsilver;
shape1.Brush.Color:=clred;
timer3.Enabled:=true;
timer2.Enabled:=false;
label1.Caption:='60';
end;
end;

procedure TForm1.Timer3Timer(Sender: TObject);
begin
if label1.Caption<>'1'then
label1.Caption:=inttostr(strtoint(label1.Caption) - 1)
else
begin
shape1.Brush.Color:=clsilver;
shape3.Brush.Color:=clgreen;
timer3.Enabled:=true;
timer2.Enabled:=false;
label1.Caption:='60';
end;
end;

end.

⌨️ 快捷键说明

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