实例化winspool.drv对象,然后调用SetDefaultPrinter方法来设置默认打印机[DllImport("winspool.drv", CharSet = CharSet.Auto, SetLastError = true)] private static extern long SetDefaultPrinter(string pszPrinter);