?现在有一问题!当pos机中的打印机在打印时突然没纸,或者没电了!在程序中怎样给个警告!也就是说怎样在程序中给个处理!!有关源代码如下:

netprobe 2002-01-08 05:20:11
是POS机中的打印机!
//打印机
TNarrowPrinter = class(TObject)
private
FOwner: TWinControl;
FOPOSPrinter: TOPOSPOSPrinter;
FOnDirectIOEvent: TOPOSPOSPrinterDirectIOEvent;
FOnErrorEvent: TOPOSPOSPrinterErrorEvent;
FOnOutputCompleteEvent: TOPOSPOSPrinterOutputCompleteEvent;
FOnStatusUpdateEvent: TOPOSPOSPrinterStatusUpdateEvent;
public
function PrintSegment(astr: string): Boolean;
constructor Create;
destructor Destroy; override;
procedure PrintSpaceline;
procedure PrintaLine;
function PrinteLine(astr: widestring): Boolean;
function PrinterStrings(aStrs: TStringList): Boolean;
function CutPaper: boolean;
function Printertest: boolean;
function SetAlignment(astr: string; pa: TPrintAlignment; aFont: Char):
string;
function SetFont(aFont: Char): string;
property OnDirectIOEvent: TOPOSPOSPrinterDirectIOEvent read FOnDirectIOEvent
write FOnDirectIOEvent;
property OnErrorEvent: TOPOSPOSPrinterErrorEvent read FOnErrorEvent write
FOnErrorEvent;
property OnOutputCompleteEvent: TOPOSPOSPrinterOutputCompleteEvent read
FOnOutputCompleteEvent write FOnOutputCompleteEvent;
property OnStatusUpdateEvent: TOPOSPOSPrinterStatusUpdateEvent read
FOnStatusUpdateEvent write FOnStatusUpdateEvent;
end;
...全文
151 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
moyue 2002-02-05
  • 打赏
  • 举报
回复
关注!
wgzhou747217 2002-02-04
  • 打赏
  • 举报
回复
关注!
yangkunjie 2002-01-08
  • 打赏
  • 举报
回复
密切关注

830

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧