To list all printers of system in C# and VB.NET you can use the following snippet.

Sample C#

for (var i = 0; i < System.Drawing.Printing.PrinterSettings.InstalledPrinters.Count; i++)
{
	var printer = System.Drawing.Printing.PrinterSettings.InstalledPrinters[i];
	MessageBox.Show(printer);
}

Sample VB.NET

For i As var = 0 To System.Drawing.Printing.PrinterSettings.InstalledPrinters.Count - 1
	Dim printer = System.Drawing.Printing.PrinterSettings.InstalledPrinters(i)
	MessageBox.Show(printer)
Next

One thought on “How to list all printers of system in C# and VB.NET”

Leave a Reply