(高手请进)用C# 如何获取打印机中的任务数
来源:百度知道 编辑:UC知道 时间:2024/06/24 14:00:24
最好给个实例。
谢谢!
在MSDN找到的,不知道可以用不,没测试过,呵呵
获取打印服务器承载的打印队列的集合。
命名空间: System.Printing
程序集: System.Printing(在 System.Printing.dll 中)
语法
Visual Basic(声明)
Public Function GetPrintQueues As PrintQueueCollection
Visual Basic(用法)
Dim instance As PrintServer
Dim returnValue As PrintQueueCollection
returnValue = instance.GetPrintQueues()
C#
public PrintQueueCollection GetPrintQueues()
Visual C++
public:
PrintQueueCollection^ GetPrintQueues()
J#
public PrintQueueCollection GetPrintQueues()
JScript
public function GetPrintQueues() : PrintQueueCollection
返回值
类型:System.Printing..::.PrintQueueCollection
打印服务器上的打印队列的 PrintQueueCollection。
示例
下面的示例演示如何使用此方法列出 PrintServer 承载的打印队列。
C# 复制代码
// Create a PrintServer
// "theServer" must be a print server to which the user has fu