我想通过网络路径获取默认的打印机名称.因为我使用网络打印机作为默认打印机.所以我需要在VB.NET或C#.Net中使用它.需要善意的帮助.提前致谢
Sivakumar.P
尝试枚举System.Drawing.Printing.PrinterSettings.InstalledPrinters
.
using System.Drawing.Printing; string GetDefaultPrinter() { PrinterSettings settings = new PrinterSettings(); foreach (string printer in PrinterSettings.InstalledPrinters) { settings.PrinterName = printer; if (settings.IsDefaultPrinter) return printer; } return string.Empty; }