새로운 글
새로운 덧글

CD-ROM 열고 닫기

2011.12.22 01:19

박병일 조회 수:44565

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  MPlayer, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    MediaPlayer1: TMediaPlayer;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation
 uses MmSystem;
{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
begin
  with MediaPlayer1 do
    if (MediaPlayer1.Mode = mpOpen) then
      mciSendCommand(MediaPlayer1.DeviceID, MCI_SET, MCI_SET_DOOR_CLOSED, 0)
    else
      mciSendCommand(MediaPlayer1.DeviceID, MCI_SET, MCI_SET_DOOR_OPEN, 0);
end;

end.



광고 모듈이 설치되어 있지 않아 실행을 중단합니다..