我在PowerBuilder中看到一个命令PrintSend(ll_job,CHAR(27) + CHAR(67) + CHAR(ll_row)), 用来控制打印机随时停止,在Delphi中能这样用吗?  我用Printer.Canvas.TextOut(x,x,CHAR(27)+CHAR(67))怎么不能实现呢?

解决方案 »

  1.   

    Printer.Abort;
    中止当前打印作业
      

  2.   

    Terminates the printing of a print job, dropping all unprinted data.Delphi syntax:procedure Abort;C++ syntax:void __fastcall Abort(void);DescriptionUse Abort to terminate the print job before it completes; otherwise, use the EndDoc method. When Abort is called, the device is then set for the next print job.
      

  3.   

    我试过了Printer.Abort,程序怎么会出现“Printer is not Currently printing”的错误提示??
      

  4.   

    PowerBuilder中好像也不能中止打印吧,数据发送过去了,最多不再发送新的数据而已,而不是立刻强制停止打印。反正Delphi没有这种用法。
      

  5.   

    但是我每次打印的行数是不确定的。事实上我是将DBGrid中读到的数据库的数据打印出来。