1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
| procedure TForm1.Timer3Timer(Sender: TObject);
var c, e : integer;
begin
randomize;
offset:=+1;
ProgressBar3.Min:=0;
ProgressBar3.Max:=10000;
Timer3.Interval:=50;
c:=ProgressBar3.Position + random(250) + 1;
ProgressBar3.Position :=c;
CurrentTime:=IncMillisecond(currentTime, Timer3.Interval);
Label3.Caption:=FormatDateTime('ss:zzz', CurrentTime);
e:=ProgressBar3.Position + offset;
If ProgressBar3.Position = ProgressBar3.Max then Timer3.Enabled :=False;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var a, c : integer;
begin
randomize;
offset:=+1;
ProgressBar1.Min:=0;
ProgressBar1.Max:=10000;
Timer1.Interval:=50;
a:=ProgressBar1.Position + random(250) + 1;
ProgressBar1.Position :=a;
CurrentTime:=IncMillisecond(currentTime, Timer1.Interval);
Label1.Caption:=FormatDateTime('ss:zzz', CurrentTime);
c:=ProgressBar1.Position + offset;
If ProgressBar1.Position = ProgressBar1.Max then Timer1.Enabled :=False;
end;
procedure TForm1.Timer2Timer(Sender: TObject);
var b, d : integer;
begin
randomize;
offset:=+1;
ProgressBar2.Min:=0;
ProgressBar2.Max:=10000;
Timer2.Interval:=50;
b:=ProgressBar2.Position + random(250) + 1;
ProgressBar2.Position :=b;
CurrentTime:=IncMillisecond(currentTime, Timer2.Interval);
Label2.Caption:=FormatDateTime('ss:zzz', CurrentTime);
d:=ProgressBar2.Position + offset;
If ProgressBar2.Position = ProgressBar2.Max then Timer2.Enabled :=False;
end; |
Partager