Solved

Accessing 2nd CD with mediplayer when more than one CD drive exists

Posted on 1998-07-15
5
123 Views
Last Modified: 2010-04-03
I have 2 CD-ROM players. How can I assign a mediaplayer to one or the other without defaulting to the 1st one. If this isn't possible how can I do it with lower level commands?

All I want to do with the mediaplayer is play a couple of CD tracks... any example code would be greatly appreciated.
0
Comment
Question by:davegreen
  • 3
  • 2
5 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 350 total points
ID: 1357925
Hi davegreen,

Change the filename property to point to the root directory of the cd drive you wish to play the cd from.

e.g. MediaPlayer1.FileName := 'E:';
Zif.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1357926
hehe, I want to let you know of this ... Seen my small freeware component cdevents on the internet? (Torries). Can be handy for you. Just want to let you know of it. Let me know what you think of it. Zif.
0
 

Author Comment

by:davegreen
ID: 1357927
Was it really that easy! Thanks Zifnab for your help once again. What components are you refering to... I would like to take a look.

Dave.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1357928
Hi davegreen, well it's that easy, but I think it's nowhere written down and I must admit I once searched it for a long time too. But when you know it, it's that easy, yes. It's just a small component I wrote once and it's mainly made for detecting a remove or insert of a cd while user pushes on the eject button of the CD-tray. It's called CDEvents.zip and you can find the last version at torry's delphi pages. I can send it also to it. Look out: I just wanted to let you know of it since you are working with cd's and maybe you can give me some new ideas or even bugs. Zif.
0
 

Author Comment

by:davegreen
ID: 1357929
Thanks Zif.. you saved me a lot of searching for the answer.
Please send me the component when you have time.. my email is dave@horusdevelopment.com.
As a related question, have you any idea of the quickest way to just play one cd track and to stop the mediaplayer from playing the next track automatically?

Thanks again for your help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now