Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get/Set Default Printer
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00095055
Message ID:
00095141
Views:
21
>Is there any way of obtaining the windows default printer name and also setting the default printer without using GetProfileString() - I would prefer to avoid INI files. I have obtained the printer details via APRINTER() but just need to be able to set default, do my printing, then set back again. Any ideas?

If I followed the thread correctly, you already know about getting the default. Setting the default (system wide, not just for VFP) must be done either by modifying the registry or the WIN.INI file. I personally would prefer the INI file, since registry corruption can quickly turn an expensive piece of hardware into a paper weight. However, there are files in the download section that will allow you to work with either method. BTW, my INI files class automatically broadcasts and changes to Win.ini, so that active applications are aware of the change.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform