>>255

フォームにラベルとボタンを2つ貼って、以下ようにすればどーなのさ。
このまんまじゃ、不都合もあるけど、こんな感じでどーよ。


Button1でスタート Button2でストップ でも、一旦スタートすると終了させる前に button2を押さないと終われない罠


var
 StartDate:int64;

procedure TForm1.Button1Click(Sender: TObject);
  procedure timeLoop;
  var
    wStr:String;
    wTT:TTimeStamp;
  begin

    while StartDate<>0 do
    begin
      wTT.Time:=GetTickCount()-StartDate;
      wStr:=FormatDateTime('nn:ss.zzz',TimeStampToDateTime(wTT));
      Self.Label1.Caption:=wStr;
      Application.ProcessMessages;
    end;

  end;

begin
  
  StartDate:=GetTickCount();
  timeLoop;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  StartDate:=0;
end;