Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Current printer?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00144671
Message ID:
00144780
Vues:
25
Whoops! Did it again. This code would be more useful in Version 3 apps where set(printer,1) does not return the Windows default printer.

FYI: The following code, along with Rick Strahl's registry class (in the files section) will get you the current Windows default printer name for comparison with the results of aprinter():
>
#DEFINE HKEY_LOCAL_MACHINE -2147483646
>
>set proc to registry.prg
>oRegistry=CREATE("Registry")
>DIMENSION taVals[1,2]
>
>lnVals=oRegistry.GetEnumValues(@taVals,HKEY_LOCAL_MACHINE,;
>	"Config\0001\System\CurrentControlSet\Control\Print\Printers")
>
>? 'Default printer is: ', taVals(1,2)
>
kenweber
GCom2 Solutions
Microsoft Certified Professional

Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform