W
w.kzjl
Unregistered / Unconfirmed
GUEST, unregistred user!
我做了一个光驱控制器(控制光驱关闭和打开),程序可以正确运行,但程序运行完后会提示出错,为什么呢?源程序如下:
procedure TForm1.N1Click(Sender: TObject);
var // 弹出光驱
returnstringchar;
begin
returnstring:='光驱打开错误!';
mciSendString('set CDAudiodo
or open',returnstring,127,0);
label1.caption:=returnstring;
end;
procedure TForm1.N2Click(Sender: TObject);
var // 关闭光驱
returnstringchar;
begin
returnstring:='光驱关闭错误!';
mciSendString('set CDAudiodo
orclosed',returnstring,127,0);
label1.caption:=returnstring;
end;
procedure TForm1.N1Click(Sender: TObject);
var // 弹出光驱
returnstringchar;
begin
returnstring:='光驱打开错误!';
mciSendString('set CDAudiodo
or open',returnstring,127,0);
label1.caption:=returnstring;
end;
procedure TForm1.N2Click(Sender: TObject);
var // 关闭光驱
returnstringchar;
begin
returnstring:='光驱关闭错误!';
mciSendString('set CDAudiodo
orclosed',returnstring,127,0);
label1.caption:=returnstring;
end;