获取默认的打印机名

PrintDocument prtdoc = new PrintDocument();
string strDefaultPrinter = prtdoc.PrinterSettings.PrinterName;//获取默认的打印机名

private void PopulateInstalledPrintersCombo()
{
// Add list of installed printers found to the combo box.(将系统中所有的打机加入列表框)
// The pkInstalledPrinters string will be used to provide the display string.(列表框中显示的字串由pkInstalledPrinters提供)
foreach(String pkInstalledPrinters in
PrinterSettings.InstalledPrinters)
{
comboInstalledPrinters.Items.Add(pkInstalledPrinters);
}
}

原文地址:https://www.cnblogs.com/zyizyizyi/p/2497861.html