打印时,若打印机没有准备好,会产生错误,结束程序,此问题应该如何解决?
源程序如下:
commondialog1.cancelerror=true
on error goto handler
commondialog1.flags=cdlpdreturndc+cdlpdnopagenums+cdlpdallpages
richtextbox1.sellength=0
commondialog1.showprinter
richtextbox1.selprint commondialog1.hdc
exit sub
handler:
exit sub