網上打了很多方法都無效,以下方法在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 ...