PrintQueue is the printer the default printer? [duplicate]

被刻印的时光 ゝ 提交于 2019-12-24 04:47:07

问题


I'm making my own dialog for printing in my application, now I have this code to put all the printers in a combobox:

        PrintServer server = new PrintServer();

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

However, I would need select the default printer, how can I see which one is the default printer?


回答1:


var DefaultPrinter = new LocalPrintServer().DefaultPrintQueue;


来源:https://stackoverflow.com/questions/5665061/printqueue-is-the-printer-the-default-printer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!