Hier mal zwei Beispiel, weil heute samstag ist (und es mir beschissen geht):
Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
begin
Progressbar1.Max := 26;
Progressbar1.Min := 0;
Progressbar1.Step := 1;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
i : Integer;
begin
for i := 0 to 25 do
begin
Sleep(100);
Progressbar1.StepIt;
if Progressbar1.Position = Progressbar1.Max then
Progressbar1.Position := 0;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
i : Integer;
begin
for i := 0 to 25 do
begin
sleep(50);
Progressbar1.Position := Progressbar1.Position+1;
if Progressbar1.Position = Progressbar1.Max then
Progressbar1.Position := 0;
end;
end;