主页 > 编程资料 > Delphi >
发布时间:2015-09-22 作者:网络 阅读:82次

var
bStop : Boolean;

procedure TForm1.btnStartClick(Sender: TObject,',',');
var
iLoop : Integer;
begin
bStop := False;
for iLoop := 1 to 1000000000 do
begin
Application.ProcessMessages;
if bStop then
begin
ShowMessage (Format('Stop at %d!', [iLoop]),',',');
break;
end;
end;
end;

procedure TForm1.btnStopClick(Sender: TObject,',',');
begin
bStop := True;
end;
关键字词: