CD ROM AÇ/KAPA(D€Lphi)

ALpMontana

КЯaL´da TaNıMaM КuяaL´da
Katılım
28 May 2006
Mesajlar
6,644
Reaction score
0
Puanları
0
Yaş
38
Konum
Eski Açık [ALiSamiYEN]
Bir buton oluşturun. Butona çift tıklayıp

mciSendString('Set cdaudio door open',nil,deger,handle); kodunu yazın. deger değişkenini integer=0 olarak atayın.
Başka bir buton daha oluşturun bu kapama butonu olacak onada
mciSendString('Set cdaudio door closed',nil,deger,handle); kodunu yazın. Unit çıktısı aşağıdaki gibi olması lazım.










unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, MPlayer, ExtCtrls, Gauges,MMSystem, ToolWin;

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

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button2Click(Sender: TObject);
const
deger:integer=0;
begin
mciSendString('Set cdaudio door open',nil,deger,handle);
end;

procedure TForm1.Button1Click(Sender: TObject);
const
deger:integer=0;
begin
mciSendString('Set cdaudio door closed',nil,deger,handle);
end;

end.
 
eline saglık
 
Geri
Üst