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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top