<分区>
Possible Duplicate:
how do i check if a printer is installed and ready using C#?
我用 PDFCreator在 C# 中从我的程序制作 pdf 文件 虽然我有一般错误的异常,但我想知道如何检查打印机本身是否存在于系统中。
类似于文件存在检查。
有这样的选择吗?
<分区>
Possible Duplicate:
how do i check if a printer is installed and ready using C#?
我用 PDFCreator在 C# 中从我的程序制作 pdf 文件 虽然我有一般错误的异常,但我想知道如何检查打印机本身是否存在于系统中。
类似于文件存在检查。
有这样的选择吗?
最佳答案
使用PrintDialog就可以知道
System.Windows.Forms.PrintDialog dlg=new PrintDialog();
if(dlg.PrinterSettings.IsValid)
MessageBox.Show("Printer Exist: "+ dlg.PrinterSettings.PrinterName);
else
MessageBox.Show("Printer Does Not Exist");
关于c# - 如何判断打印机是否存在?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9653589/