How to get the list of all printers in computer

Gold picture Gold · Mar 1, 2010 · Viewed 119k times · Source

I need to get the list of all printers that connect to computer?

How I can do it in C#, WinForms?

Answer

Jojo Sardez picture Jojo Sardez · Mar 1, 2010

Try this:

foreach (string printer in System.Drawing.Printing.PrinterSettings.InstalledPrinters)
{
    MessageBox.Show(printer);
}