Tracks -property in MediaPlayer -object ?

Posted on 1998-02-16
Last Modified: 2010-04-04
Hi !

D2 help shows this exampel code to skips to the beginning of the last track on a CD audio device.


with MediaPlayer1 do
if DeviceType = dtCDAudio then
  for I := 1 to Tracks-1 do

>gives types don't fit -message?

1. How do you perform a simple task (by RadioGroupBox) to
go to the beginning of certain track and to the beginning of
certain track position (say at 2 min. 30 sec. on same track)

Many thanks for bothering you!
Question by:GISEXP
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

inter earned 50 total points
ID: 1359322
With the following you can seek to any (Trac, Minute, Second)
But besure to add the MMSystem to you USES clause:

procedure SeekToTrack(M : TMediaPlayer; Trac, Minute, Second: Byte);
 with M do
 if DeviceType = dtCDAudio then
   // we set the time to Track Minute Second Frame Format
   TimeFormat := tfTMSF;
   // This macro makes up a position from vars Frame is 0
   // for CDs
   Position := mci_Make_TMSF(Trac, Minute, Second,0);


Author Comment

ID: 1359323
Thanks Igor!

This will do at the moment, I'll try to proceed in making the
UI for my birdsong CDs.

best regards.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL ( and MongoDB (…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question