X
xiaoxiami0
Unregistered / Unconfirmed
GUEST, unregistred user!
我下面的代码是窗体的caption的数值先增加,进度条后增加,能否让他们一块变化?
procedure TForm1.Button1Click(Sender: TObject);
var
i,y:integer;
begin
for i:=0 to 10000 do
begin
form1.Caption:=floattostr(strtofloat(form1.caption)+1);
end;
for y:=0 to 10000 do
begin
progressbar1.Position:=progressbar1.Position+1;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
i,y:integer;
begin
for i:=0 to 10000 do
begin
form1.Caption:=floattostr(strtofloat(form1.caption)+1);
end;
for y:=0 to 10000 do
begin
progressbar1.Position:=progressbar1.Position+1;
end;
end;