Solved

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

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

776 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