winform设置默认打印机
/// <summary>
/// 设置默认打印机
/// </summary>
public class Externs
{
[DllImport("winspool.drv")]
public static extern bool SetDefaultPrinter(String Name); //调用win api将指定名称的打印机设置为默认打印机
}
Externs.SetDefaultPrinter("Microsoft Shared Fax Driver");