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
28 lines
651 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Runtime.InteropServices;
|
|
using System.Drawing.Printing;
|
|
|
|
namespace ICSSoft.Base.Lable.PrintTool
|
|
{
|
|
public class GetPrinterInfo
|
|
{
|
|
public static List<string> GetPrinters()
|
|
{
|
|
List<string> lsit = new List<string>();
|
|
PrintDocument print = new PrintDocument();
|
|
|
|
|
|
|
|
foreach (string sPrint in PrinterSettings.InstalledPrinters)//获取所有打印机名称
|
|
{
|
|
lsit.Add(sPrint);
|
|
|
|
}
|
|
|
|
return lsit;
|
|
}
|
|
}
|
|
}
|