how to get PRINTERS NAMES ?

  • Thread starter Thread starter pamelafluente
  • Start date Start date
P

pamelafluente

I need to load all the available printers
- including network ones - in a combobox.

Would anybody so kind as to show me how to do it? Thank you

-Pamela
 
You can get a list of installed printers using the static
"InstalledPrinters" property of the PrinterSettings class.

using System.Drawing.Printing;

try
{
foreach (string printer in PrinterSettings.InstalledPrinters)
{
this.comboBox1.Items.Add(printer);
}
}
catch
{
// ... handle exception ...
}
 
Thank you very much Tim. Very helpful!!

-Pamela

Tim Wilson (UNDERSCORE AT PERIOD) ha scritto:
 
I have a followup question for this topic?

How about getting the Network IP Address/Hostname/PortNumber and Mac Address of a specific Network printer?

Can C#.net do that?
 
Back
Top