Jump to Real's How-to Main page

Get a list of printers installed

In this example, we populate a listbox with the printers name
string printers[]
int rtn, i, nbPrinters
rtn = RegistryKeys &
   ("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print\Printers", & 
      printers)
nbPrinters = UpperBound(printers)
FOR i = 1 TO nbPrinters
    lb_1.addItem(printers[i])
NEXT

If you find this article useful, consider making a small donation
to show your supportfor this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2005
[ home ]