| Fill ComboBox with Printers |
|
|
|
| Tutorials | |||
|
Code below will fill a combobox named (Combo1) with all available Printers.
1 2 Public Sub m_GetPrinters(ByRef Combo1 As Object) 3 '*********************************** 4 '*** Code From VisibleVisual.com *** 5 '*********************************** 6 Dim pkInstalledPrinters As String 7 8 ' Find all printers installed 9 10 For Each pkInstalledPrinters In PrinterSettings.InstalledPrinters 11 12 Combo1.Items.Add(pkInstalledPrinters) 13 14 Next pkInstalledPrinters 15 16 ' Set the combo to the first printer in the list 17 18 Combo1.SelectedIndex = 0 19 20 End Sub
|


