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
Thanks
Posted by Legacy on 03/04/2003 12:00amOriginally posted by: Tim Ryan
great code
Replythank you
filling combo box with printers
Posted by Legacy on 01/12/2002 12:00amOriginally posted by: Baksh
i was actually amazed with the code because . i came to this site through a search engine.i was actually thinks i would take me at least 1/2 hr job to find this source , but i got it in one single click
Reply