DelphiFAQ Home Search:
General :: Programming :: Delphi
General Delphi related information.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.
Recommended links on this topic:
Featured Article

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. 

Generated 0:01:31 on Apr 25, 2018