网上打了很多方法都无效,以下方法在WIN7pro中测试可用: Sub QQ1722187970() MsgBox "当前默认的打印机名称为" & Excel.Application.ActivePrinter End Sub 通过直接使用WMI来获取 ...
public static string GetPrinterStatus string PrinterName int intValue GetPrinterStatusInt PrinterName string strRet string.Empty switch intValue case : strRet 准备就绪 Ready break case x : strRet 忙 Busy ...
2012-08-13 14:32 3 15299 推荐指数:
网上打了很多方法都无效,以下方法在WIN7pro中测试可用: Sub QQ1722187970() MsgBox "当前默认的打印机名称为" & Excel.Application.ActivePrinter End Sub 通过直接使用WMI来获取 ...
一:获得本地安装的打印机列表 注:(如果在“设备和打印机”中已经添加了局域网的打印机设备,也算是本地安装的打印机;没有添加的则算作局域网打印机) 1,通过 C# 中 PrinterSettings 对象获取,如下,然后通过 foreach 即可遍历 printers ...
List<string> print = Cprinter.GetLocalPrinter(); View Code ...
第一步:添加引用using System.Printing;第二步:代码public static List<string> GetPrintList(){ List& ...
关于这个需求非常早就考虑了,一直没敢下手,也不是不敢,是之前下过一次手可是没有成功。一直过了几个月腾出一些空暇来解决问题。另外说明一下,截止到眼下对于这个需求我还没有一个全然的解决方式。这篇也仅仅是捋下思绪。 关于打印机状态的问题 ...
LocalPrinter.cs Externs.cs ...
原文:https://www.cnblogs.com/Old-Fish/p/6258118.html ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Syste ...