What's the best way to get the default printer in .NET

前端 未结 7 1293
生来不讨喜
生来不讨喜 2020-12-07 12:58

I need to get the default printer name. I\'ll be using C# but I suspect this is more of a framework question and isn\'t language specific.

相关标签:
7条回答
  • 2020-12-07 13:58

    This should work:

    using System.Drawing.Printing;

    PrinterSettings settings = new PrinterSettings(); string defaultPrinterName = settings.PrinterName;

    0 讨论(0)
提交回复
热议问题