unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls;type TForm1 = class(TForm) Button1: TButton; Timer1: TTimer; procedure FormCreate(Sender: TObject); procedure Timer1Timer(Sender: TObject); procedure Button1Click(Sender: TObject); private { Private declarations } i:integer; public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);begini:=11;end;procedure TForm1.Timer1Timer(Sender: TObject);begininc(i);end;procedure TForm1.Button1Click(Sender: TObject);beginif i>10 then beginshowmessage('可以查询');i:=0;end else begin//不允许查询,不做处理end;end;end.