By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,344 Members | 1,114 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,344 IT Pros & Developers. It's quick & easy.

Numer of network printers in VB.NET

P: 1
Does someone know how I can display in a VB.NET label the number of network printers installed in the computer??
Sep 14 '12 #1
Share this Question
Share on Google+
1 Reply

P: 298
...along with the code to pop each "InstalledPrinters" in a msgbox.

Expand|Select|Wrap|Line Numbers
  1. 'you'll need this at the top
  2. Imports System.Drawing.Printing
  3. '....
  4.     Private Sub findInstalledPrinters()
  5.         Me.MyLabel.Text = PrinterSettings.InstalledPrinters.Count
  6.         Dim pkInstalledPrinters As String
  8.         ' Find all printers installed
  9.         For Each pkInstalledPrinters In _
  10.             PrinterSettings.InstalledPrinters
  11.             MsgBox(pkInstalledPrinters)
  12.         Next pkInstalledPrinters
  14.     End Sub
Sep 14 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.