using System.Drawing.Printing
PrintDocument prtdoc = new PrintDocument();
string strDefaultPrinter = prtdoc.PrinterSettings.PrinterName;//获取默认的打印机名
foreach (string ss in PrinterSettings.InstalledPrinters)
{
///在列表框中列出所有的打印机,
printerList.Items.Add(ss);
if (ss == strDefaultPrinter)//把默认打印机设为缺省值
{
printerList.SelectedIndex = printerList.Items.IndexOf(ss);
}
}