判断软盘是否准备好
类 别:文件操作
procedure TForm1.HandleMyException(Sender: TObject; E: Exception);
begin
if (E.ClassType.ClassName='EInOutError') then
begin
{do something great to (or for) the user}
MessageBox( Handle,'设备尚未准备好','错误',MB_OK or MB_ICONERROR);
end
else Application.ShowException(E); {let Delphi take it from here}
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnException := HandleMyException;
end;
--------方法2
If Not FileExists('a:/nul') Then
MessageBox(Handle,'请在A驱中插入软盘','',MB_OK)
2)用COPYFILE