Mega Code Archive

 
Categories / Delphi / Examples
 

Tmediaplayer - which is the current cd track

This will show current track and time of your music CD. uses MMSystem; procedure ShowCDTrack; var Trk, Min, Sec : word; begin With MediaPlayer1 do begin Trk := mci_TMSF_Track (Position); Min := mci_TMSF_Minute (Position); Sec := mci_TMSF_Second (Position); Label1.Caption := Format ('%.2d', [Trk]); Label2.Caption := Format ('%.2d:%.2d', [Min, Sec]) end end.