Esto se puede hacer de esta manera:
Código Delphi
[-]
procedure TFPral.Establecer_Tiempos;
var Hs, Min, Seg: integer;
LHs, LMin, LSeg: string;
begin
Proceso.Min := 0;
Proceso.Max := Reproductor.Length Div 1000;
Proceso.Position := 0;
Seg := Reproductor.Length Div 1000;
Hs := Seg Div 3600;
Seg := Seg - (Hs * 3600);
Min := Seg Div 60;
Seg := Seg - (Min * 60);
if Hs >= 10
then begin
LHs := IntToStr(Hs);
end
else begin
LHs := '0'+IntToStr(Hs);
end;
if Min >= 10
then begin
LMin := IntToStr(Min);
end
else begin
LMin := '0'+IntToStr(Min);
end;
if Seg >= 10
then begin
LSeg := IntToStr(Seg);
end
else begin
LSeg := '0'+IntToStr(Seg);
end;
LTiempo.Caption := Lhs +':'+ LMin +':'+ LSeg;
Ltema.Caption := ExtractFileName(Reproductor.FileName);
Proceso.Enabled := True;
Play.Enabled := True;
end;
Para que funcione correctamente asegúrate antes de hacer dichos cálculos que la proopiedad TimeFormat tenga el valor tfMilliseconds.