Re: Eject cd-player!


[ Related Articles and Replies ] [ DelphiLand FAQ ] [ Delphi Tutorials ]

Posted by Gyrman The Grym on December 28, 2001 at 10:00:24:

In Reply to: Eject cd-player! posted by JiiPee on December 23, 2001 at 11:52:33:

If you really want to do so you must place standart MediaPlayer component to your app, make it invisible and link your button with MediaPlayer's like this:

procedure TForm1.Button1Click(Sender: TObject);
begin
  Form1.MediaPlayer1.DeviceType := dtCDAudio;
  {to define the type of device, if not defined  delphi raises an error}
  form1.MediaPlayer1.Open;
  form1.MediaPlayer1.Eject;
  form1.MediaPlayer1.close;
end;

Related Articles and Replies


[ Related Articles and Replies ] [ DelphiLand FAQ ] [ Delphi Tutorials ]