Fill a combobox with current defined printers
Posted
by Andri Masson
on January 30th, 2004
private Sub Form_Load()
Combo1.Clear
m_GetPrinters Combo1
Combo1.ListIndex = 0
End Sub
'-----------------------------------------------------------------
' looking for all printers and filling objListOrCombo
'-----------------------------------------------------------------
public Sub m_GetPrinters(byref objListOrCombo as Object)
Dim objPrinter as Printer
Dim intNbOfPrinters as Integer
intNbOfPrinters = Printers.Count - 1
for Each objPrinter In Printers
objListOrCombo.AddItem objPrinter.DeviceName
next
End Sub

Comments
There are no comments yet. Be the first to comment!