Solved

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

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Suggested Solutions

Title # Comments Views Activity
Delphi: how to send PJL commands to printer 3 108
Internet Explorer View Settings Question 15 116
Delphi...Split view - idea? 1 87
Installshield for Embarcadero EX 10.1 Berlin 4 60
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

791 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