procedure TForm1.Timer1Timer(Sender: TObject);
begin
label1.Caption:=inttostr(strtoint(label1.caption)+1);        //转字符串(转数值())
end;

procedure TForm1.Timer2Timer(Sender: TObject);
begin
label2.Caption:=datetimetostr(now);                                  //获取当前时间
end;

procedure TForm1.Timer3Timer(Sender: TObject);
var i: hwnd;
begin
i:=findwindow('SciCalc','计算器');                                         //获取窗体(类,名)
if i <>0 then
label3.Caption:='ok'

else
label3.Caption:='NO'  ;
end;

Posted on 2011-03-23 22:34  dekill  阅读(185)  评论(0编辑  收藏  举报