使用parent让进度条上显示文字
procedure TForm1.Button1Click(Sender:
TObject);
begin
Label1.Font.Color:=clRed;
Label1.Transparent:=True;
Label1.Alignment:=taCenter;
Label1.Parent:= ProgressBar1;
Label1.Left:= (ProgressBar1.Width -
label1.Width) div 2;
label1.Top :=
(ProgressBar1.Height - label1.Height) div 2;
end;