找到答案了..<br> procedure Tform1.WMDEVICECHANGE(var msgx :Tmessage);<br><br> const<br><br> DBT_DEVICEARRIVAL=;<br><br> DBT_DEVICEREMOVECOMPLETE=;<br><br> begin<br><br> inherited;<br><br> case msgx.WParam of<br><br> DBT_DEVICEARRIVAL:Caption :='有光盘';<br><br> DBT_DEVICEREMOVECOMPLETE:Caption :='没有光盘';<br><br> end;<br><br> end;<br><br>