Solved

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

Posted on 1998-07-15
5
127 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

749 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