?
Solved

Populate a combo box with installed printers

Posted on 2009-07-09
2
Medium Priority
?
307 Views
Last Modified: 2012-05-07
I have had a look around for this and although it does seem possible i cant seem to find it. I am using VB2005.net and i want to populate a combobox with a list of installed printers. How can i do it.
Most things i have read say start with DIM DEV as PRINTER but printer is not avaliable as an option

Any ideas as this is urgent
0
Comment
Question by:bostonste
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 2000 total points
ID: 24813815
Loop through the PrinterSettings.InstalledPrinters collection adding the printers to a ComboBox
http://www.vb-helper.com/howto_net_list_printers.html
Imports System.Drawing.Printing
 
Private Sub Form1_Load(ByVal sender As Object, ByVal e As _
    System.EventArgs) Handles MyBase.Load
    Dim pkInstalledPrinters As String
 
    ' Find all printers installed
    For Each pkInstalledPrinters In _
        PrinterSettings.InstalledPrinters
        cboInstalledPrinters.Items.Add(pkInstalledPrinters)
    Next pkInstalledPrinters
 
    ' Set the combo to the first printer in the list
    cboInstalledPrinters.SelectedIndex = 0
End Sub

Open in new window

0
 

Author Closing Comment

by:bostonste
ID: 31601600
Thank you that was perfect
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month9 days, 19 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question