Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi

 

How can I find using C# the list of printers available?

In VB, I used to do the following:

 

Dim oPrn As Printer

 

For Each oPrn In Printers

AddToList oPrn.DeviceName

Next

 

 

Thanks

  • Administrators
Posted

straight from msdn

 

private void PopulateInstalledPrintersCombo()
{
   // Add list of installed printers found to the combo box.
   // The pkInstalledPrinters string will be used to provide the display string.
   String pkInstalledPrinters;
   for (int i = 0; i < PrinterSettings.InstalledPrinters.Count; i++){
       pkInstalledPrinters = PrinterSettings.InstalledPrinters[i];
       comboInstalledPrinters.Items.Add(pkInstalledPrinters);
   }
}

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...