//设置第一个进程条在状态栏第一个panel的位置 progressbar1.Top := r.Top; //set size of progressbar1.Left := r.Left; //Progressbar to progressbar1.Width := r.Right - r.Left; //fit with panel progressbar1.Height := r.Bottom - r.Top;
//设置第二个进程条在状态栏第三个个panel的位置 progressbar2.Top := r2.Top; //set size of progressbar2.Left := r2.Left; //Progressbar to progressbar2.Width := r2.Right - r2.Left; //fit with panel progressbar2.Height := r2.Bottom - r2.Top; //以上我们设定进程条充满各自的panel,当然你可以设定进程条的top,left等属性来调整显示位置 end; procedure TForm1.Button1Click(Sender: TObject); var i:integer; begin for i:=0 to 100 do begin Sleep(100); ProgressBar1.Position:=i; ProgressBar2.Position:=i; end; end;