华恒Mes鼎捷代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
651 B

5 months ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Runtime.InteropServices;
  6. using System.Drawing.Printing;
  7. namespace ICSSoft.Base.Lable.PrintTool
  8. {
  9. public class GetPrinterInfo
  10. {
  11. public static List<string> GetPrinters()
  12. {
  13. List<string> lsit = new List<string>();
  14. PrintDocument print = new PrintDocument();
  15. foreach (string sPrint in PrinterSettings.InstalledPrinters)//获取所有打印机名称
  16. {
  17. lsit.Add(sPrint);
  18. }
  19. return lsit;
  20. }
  21. }
  22. }