我想当选中打印选项时,dephi中导出到excel中的数据可以直接打印,如果在这个过程中打印机没有准备好,则给出打印机错误提示,然后中止打印。不知道如何处理这个打印机准备好的判断过程。
....
try
if chkprint.Enabled=true then //选中打印
excelsheet.PrintOut;
except
showmessage('打印机错误!');
end;excelapp.DisplayAlerts[LCID]:=false; //不显示存盘,直接退出
excelapp.Quit;
....
try
if chkprint.Enabled=true then //选中打印
excelsheet.PrintOut;
except
showmessage('打印机错误!');
end;excelapp.DisplayAlerts[LCID]:=false; //不显示存盘,直接退出
excelapp.Quit;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货