• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

Closing CD-ROM tray

How can I close CD-ROM tray, I mean the oposite method for Eject.
I use TMediaPlayer

Motaz
0
Motaz
Asked:
Motaz
  • 4
  • 3
1 Solution
 
ZifNabCommented:
To close the CD-ROM:

       mciSendString('Set cdaudio door closed wait', nil, 0, handle);

OR

procedure TCDEvents.CloseDoor;
var
  SetParm: TMCI_Set_Parms;
begin
  FFlags := 0;
  FFlags := mci_notify or mci_set_door_closed;
  SetParm.dwCallback := 0;
  fErrCode := mciSendCommand( ID, mci_Set, FFlags, Longint(@SetParm) );
end;

You can get the ID from Mediaplayer.
0
 
MotazAuthor Commented:
Thanks Tom
Motaz
0
 
ZifNabCommented:
Glad I could help you Motaz.
0
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!

 
MotazAuthor Commented:
by the way ZiffNap, what is your real name, where r u from and where is experts-exchange, is it in USA in which state ?
 :)

Motaz
0
 
ZifNabCommented:
Hi,

Hi Motaz, my real name is Tom (thought you knew it already) and I'm from Belgium (I think you can see it also at my info (click on ZifNab).

E-E? Guess in USA. (Experts Exchange, Inc.;   406 Higuera Street, Suite 120; San Luis Obispo, CA 93401)

ID of cd can be found through mediaplayer1.DeviceID

Zif.
0
 
MotazAuthor Commented:
Thanks Tom, nice to meet you
Motaz Abdel Azim from Sudan
0
 
ZifNabCommented:
Nice to meet you too Motaz Abdel Azim.
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!

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now