TrackBar自动循环滚动
如图所示
[解决办法]
var bo:Boolean;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
with TrackBar1 do
begin
bo:=(Position<>Max) and ((Position=0) or (bo));
if bo then
Position:=Position+1
else
Position:=Position-1;
end;
end;
快慢自己调Timer1.Interval
procedure TForm1.Timer1Timer(Sender: TObject);
begin
with TrackBar1 do
if Tag = 0 then
if Position = Max then
begin
Position := Position - 1;
Tag := 1
end else
Position := Position + 1
else
if Position = Min then
begin
Position := Position + 1;
Tag := 0
end else
Position := Position - 1
end;