21-04-2009, 10:08 AM
ضع تايمر على الفورم ودبل كلك وضع الكود التالي
كود :
var
TotLen, CurPos, PerComp, FPS: Extended;
begin
MediaPlayer1.TimeFormat := tfMilliseconds;
TotLen := (MediaPlayer1.Length / 1000) / 60;
CurPos := (MediaPlayer1.Position / 1000) / 60;
PerComp := (100 * (CurPos / TotLen));
FPS := (MediaPlayer1.Frames / (MediaPlayer1.Length / 1000));
Label1.Caption := FloatToStrF(TotLen, ffGeneral, 5, 2);
Label2.Caption := FloatToStrF(CurPos, ffGeneral, 5, 2);
Label3.Caption := IntToStr(Round(PerComp));
Label4.Caption := IntToStr(Round(FPS));
end;
لا إله إلا الله محمد رسول الله

