#region 获取本机默认打印机名称
        ArrayList al1=new ArrayLIst();
private static PrintDocument fPrintDocument = new PrintDocument(); /// <summary> /// 获取本机默认打印机名称 /// </summary> public static String DefaultPrinter { get { return fPrintDocument.PrinterSettings.PrinterName; } } public void Add() { al1.Add(DefaultPrinter); foreach (String fPrinterName in PrinterSettings.InstalledPrinters) { if (!al1.Contains(fPrinterName)) { al1.Add(fPrinterName); } } } public void Combox() { comboBox1.Text = al1[0].ToString(); foreach (string xx in al1) { // listBox1.Items.Add(xx); comboBox1.Items.Add(xx); } } #endregion

 

 

相关文章:

  • 2021-05-22
  • 2022-01-06
  • 2022-12-23
  • 2021-11-09
  • 2022-03-08
  • 2021-11-13
猜你喜欢
  • 2022-01-30
  • 2021-12-12
  • 2021-11-09
  • 2022-01-28
  • 2021-11-12
  • 2022-01-09
相关资源
相似解决方案