delphi如何读取打印机的状态

[复制链接]
查看11 | 回复5 | 2021-1-27 06:08:43 | 显示全部楼层 |阅读模式
使用delphi如何读取打印机的状态,如缺纸、缺墨、忙等等。网上找了很多代码,都不能用。
分 -->
回复

使用道具 举报

千问 | 2021-1-27 06:08:43 | 显示全部楼层
http://blog.csdn.net/delphi308/article/details/9877043
回复

使用道具 举报

千问 | 2021-1-27 06:08:43 | 显示全部楼层
引用1楼gyk120的回复:http://blog.csdn.net/delphi308/article/details/9877043
这里面的方法只对WIN95有用,貌似没什么用处吧。
回复

使用道具 举报

千问 | 2021-1-27 06:08:43 | 显示全部楼层
引用2楼mayyang610的回复:Quote: 引用1楼gyk120的回复:
http://blog.csdn.net/delphi308/article/details/9877043

这里面的方法只对WIN95有用,貌似没什么用处吧。

印象中Delphi封装了一个TPrinter的类,里面应该有相关的代码
另外还有一种办法是打电话去问打印机的厂家技术售后,问他们提供了接口没有
回复

使用道具 举报

千问 | 2021-1-27 06:08:43 | 显示全部楼层
应该可以,在tptinter类中类似于脱机。暂停打印,这些
回复

使用道具 举报

千问 | 2021-1-27 06:08:43 | 显示全部楼层
引用4楼uhjiok123的回复:应该可以,在tptinter类中类似于脱机。暂停打印,这些
public
constructorCreate;
destructorDestroy;override;
procedureAbort;
procedureBeginDoc;
procedureEndDoc;
procedureNewPage;
procedureGetPrinter(ADevice,ADriver,APort:PChar;varADeviceMode:THandle);
procedureSetPrinter(ADevice,ADriver,APort:PChar;ADeviceMode:THandle);
procedureRefresh;
propertyAborted:BooleanreadFAborted;
propertyCanvas:TCanvasreadGetCanvas;
propertyCapabilities:TPrinterCapabilitiesreadFCapabilities;
propertyCopies:IntegerreadGetNumCopieswriteSetNumCopies;
propertyFonts:TStringsreadGetFonts;
propertyHandle:HDCreadGetHandle;
propertyOrientation:TPrinterOrientationreadGetOrientationwriteSetOrientation;
propertyPageHeight:IntegerreadGetPageHeight;
propertyPageWidth:IntegerreadGetPageWidth;
propertyPageNumber:IntegerreadFPageNumber;
propertyPrinterIndex:IntegerreadGetPrinterIndexwriteSetPrinterIndex;
propertyPrinting:BooleanreadFPrinting;
propertyPrinters:TStringsreadGetPrinters;
propertyTitle:stringreadFTitlewriteFTitle;
end;
这些是TPrinter的属性和方法,没有找到关于状态的。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行