Technology Programming

TMediaPlayer: What track am I on?

< Continued from page 2

Drop a TMediaPlayer component on the form, with all the properties correctly set and bound to the CD player. Also, add "MMSystem" to the uses clause in the calling form. To complete, create a TTimer and put the code below in its OnTimer event:

~~~~~~~~~~~~~~~~~~~~~~~~~
uses MMSystem;

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',) ;
    Label2.Caption := Format('%.2d:%.2d',[Min,Sec]) ;
  end;
end;
~~~~~~~~~~~~~~~~~~~~~~~~~


Delphi tips navigator:
» TMemo printing
« Week number calculating

Related posts "Technology : Programming"

Differences Between Byte Array Vs. String

Programming

Web Design Company UK/

Programming

Develop A Quality Plan With These Self Help Tips

Programming

TMediaPlayer: What track am I on?

Programming

How You Can Prove Your Expertise

Programming

Furniture Advice And Tips And Also Hardwearing. Property Searching Wonderful

Programming

Web Design Fort Lauderdale Business

Programming

Hire Web Designer and Diminish Development Expenditure

Programming

Web Masters.

Programming

Leave a Comment