Share this page 

Get a list of printers installedTag(s): WinAPI/Registry


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