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;
关键字词: