Solved

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

Posted on 1998-07-15
5
121 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

11 Experts available now in Live!

Get 1:1 Help Now