D
d4fan
Unregistered / Unconfirmed
GUEST, unregistred user!
type
TForm1 = class(TForm)
private
{ Private declarations }
procedure isCDROMInserted(var Msg:TMessage);message WM_DEVICECHANGE;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
{ TForm1 }
procedure TForm1.isCDROMInserted(var Msg: TMessage);
begin
if Msg.WParam=DBT_DEVICEARRIVAL then
{DBT_DEVICEARRIVAL为光驱塞入光盘的标志}
ShowMessage('CD Inserted');
end;
end.
不好用
TForm1 = class(TForm)
private
{ Private declarations }
procedure isCDROMInserted(var Msg:TMessage);message WM_DEVICECHANGE;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
{ TForm1 }
procedure TForm1.isCDROMInserted(var Msg: TMessage);
begin
if Msg.WParam=DBT_DEVICEARRIVAL then
{DBT_DEVICEARRIVAL为光驱塞入光盘的标志}
ShowMessage('CD Inserted');
end;
end.
不好用