从书上得来的,可以用的。
//显示播放或录制的时间
procedure tform1.shownowtimeorframe;
var
nowtime,alltime:LongInt;
minutes,seconds:integer;
begin
//if showformat=timeformat then
// begin
with mediaplayer1do
begin
timeformat:=tfmilliseconds;
nowtime:=position;
alltime:=length;
minutes:=nowtime div 60000;
seconds:=(nowtime-60000*minutes) div 1000;
label1.Caption:=inttostr(minutes)+'分'+inttostr(seconds)+'秒';
minutes:=alltime div 60000;
seconds:=(alltime-60000*minutes) div 1000;
label2.Caption:=inttostr(minutes)+'分'+inttostr(seconds)+'秒';
end;
end;