Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Current printer?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00144671
Message ID:
00144780
Views:
24
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

Previous
Reply
Map
View

Click here to load this message in the networking platform