代码如下:
procedure button1click()
var
count;integer;
begin
count:=11;
while count<900 do
begin
for i:=1 to 888 do
begin
label1.caption:=inttostr(count+i);
label1.refresh;
end;
if count=899 then
count:=11;
end;
end. ---此程序是一直在循环执行的
此程序类似什么抽奖方式的东西.能不能在某些时候,通过某些设置实现此程序的中断,让label1.caption的具体某个数值固定显示出来.不知道我是不是说清楚了,希望大侠们能帮我解决,谢谢你们的帮助.
procedure button1click()
var
count;integer;
begin
count:=11;
while count<900 do
begin
for i:=1 to 888 do
begin
label1.caption:=inttostr(count+i);
label1.refresh;
end;
if count=899 then
count:=11;
end;
end. ---此程序是一直在循环执行的
此程序类似什么抽奖方式的东西.能不能在某些时候,通过某些设置实现此程序的中断,让label1.caption的具体某个数值固定显示出来.不知道我是不是说清楚了,希望大侠们能帮我解决,谢谢你们的帮助.
procedure TForm1.Button1Click(Sender: TObject);
var
count,i:integer;
begin
stop:=false;
count:=11;
while true do
begin
for i:=1 to 888 do
begin
if stop then exit;
label1.caption:=inttostr(count+i);
label1.refresh;
sleep(50);
application.ProcessMessages;
end;
inc(count);
if count>889 then count:=11;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
stop:=true;
end;
public
re:integer;procedure TForm1.Button1Click(Sender: TObject);
var count:integer;
i:integer;
begin
re:=0;
count:=11;
while count<900 do
begin
for i:=1 to 888 do
begin label1.caption:=inttostr(count+i);
if re=1 then break;
application.ProcessMessages; end;
if count=899 then
count:=11;
end;
end;procedure TForm1.Button2Click(Sender: TObject);
begin
re:=1;
end;end.
public
re:integer;procedure TForm1.Button1Click(Sender: TObject);
var count:integer;
i:integer;
begin
re:=0;
count:=11;
while count<900 do
begin
for i:=1 to 888 do
begin label1.caption:=inttostr(count+i);
if re=1 then break;
application.ProcessMessages; end;
if count=899 then
count:=11;
end;
end;procedure TForm1.Button2Click(Sender: TObject);
begin
re:=1;
end;end.