ProgressBar 및 Timer를 사용하여 일부 진행 대기열/인라인 프로세스를 수행하는 것에 익숙합니다. 나는 TTimer와 ProgressBar를 대신 찾고 있습니다. 이것이 내가 말하고자하는 것입니다. 내가 들어, ProgressBar를 볼 필요가 없기 때문에타이머와 일치하는 프로 시저
procedure TForm1.tmr1Timer(Sender: TObject);
begin
ProgBar1.Position := ProgBar1.Position +1;
if ProgBar1.Position = 10 then
begin
m1.Lines.Add('Progress 1 : Exec A') ;
ExecAA(Sender);
end;
if ProgBar1.Position = 20 then
begin
m1.Lines.Add('Progress 2 : Exec B');
ExecAB(Sender);
end;
if ProgBar1.Position = 30 then
begin
m1.Lines.Add('Progress 3 : Exec C');
ExecAC(Sender);
end;
// and so on, and so forth ...
end;
지금은 그냥이의 ProgressBar를 숨길 수 : 여기 OnTimer 이벤트입니다. Timer와 정수를 대체하려고했지만 적합하지 않은 것으로 보입니다.
procedure TForm1.tmr1Timer(Sender: TObject);
var
xx : Integer;
begin
xx := xx + 1;
if xx = 10 then
.....
ProgressBar를 사용하지 않고 똑같은 기능을 수행 할 수 있습니까?
항상 좋아하는 멘토의 한방. 감사합니다! 이제 xx는 public에 있습니다. {public declarations} xx : Integer; 모두 필요한만큼만 수행됩니다. – Bianca