Get a list of installed printers

Using a foreach loop in C# to retrieve a list of all installed printers (available or unavailable.)
// The PrinterSettings class is located inside the Printing namespace
using System.Drawing.Printing;
 
// Loop through the string collection of printers
foreach (string strPrinter in PrinterSettings.InstalledPrinters)
{
   // Show the name of the printer
   MessageBox.Show(strPrinter);
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top