C # access to the machine all the printer name

Private  void AA () 
        { 
            System.Drawing.Printing.PrintDocument Print = new new System.Drawing.Printing.PrintDocument ();
             String sDefault = print.PrinterSettings.PrinterName; // default printer name 
            the foreach ( String Sprint in the System.Drawing.Printing .PrinterSettings.InstalledPrinters) // get all the printer name 
            { 
                MessageBox.Show (sDefault); 
            } 
        }

 

Guess you like

Origin www.cnblogs.com/yinmu/p/11267984.html