|
|
Title | List installed printers in VB .NET |
Keywords | printers, installed printers, VB .NET |
Categories | Graphics, VB.NET |
|
|
Loop through the PrinterSettings.InstalledPrinters collection adding the printers to a ComboBox.
Thanks to Duncan.
|
|
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
|
|
|
|
|
|