c# - PrintQueue打印机是默认打印机吗?

标签 c# wpf printing printqueue

我正在制作自己的应用程序中的打印对话框,现在我有以下代码将所有打印机放入组合框中:

        PrintServer server = new PrintServer();

        foreach (PrintQueue queue in server.GetPrintQueues())
        {
            cboPrinters.Items.Add(queue.FullName);
        }

但是,我需要选择默认打印机,如何查看哪一台是默认打印机?

最佳答案

var DefaultPrinter = new LocalPrintServer().DefaultPrintQueue;

关于c# - PrintQueue打印机是默认打印机吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5665061/

相关文章:

c# - 根据用户时区显示UTC时间

wpf - 除非先单击行,否则 ListView 行内的WPF MVVM按钮不起作用

javascript - jQuery:隐藏包含 ul + print 的子 td 的 tr?

PHP等同于Perl格式化函数

c# - 将进程的工作目录设置为 exe 的路径?

c# - 具有驱动器号的 Path.Combine() 行为

c# - 如何将文件从独立存储复制到 skydrive

c# - 文本 block 在数据网格 WPF 中选择前景色

c# - 基于绑定(bind)数据的 MenuItem 模板更改

html - Chrome 中没有打印预览