Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET PRINTER TO NAME etc
Message
From
08/07/2003 01:14:27
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00807828
Message ID:
00807831
Views:
14
>Has anyone else had problems with applications which change the default printer in Windows, but then Windows itself does not recognise that change?
>
>I've written some code where I call the API to change the default Windows printer, then change it back to the original setting. If you open the Printers window from the Settings menu (for example), the correct printer is shown as default, and the "Set As Default" option is ticked. However other applications don't recognise that setting.
>
>It's not until you actually click "Set As Default" in the drop down menu of the printer that Windows actually really sets this setting. Thereafter everything works normally again.
>
>This is VFP6 on Win98 using runtime.
>
>I tried using SET PRINTER TO NAME in my application, but that doesn't change the Windows default printer, so I call the API instead.

Is there a particular reason you're trying to change the Windows default printer, rather than just setting the printer for your VFP app?

If you truly are changing the Windows default printer, I'd expect all subsequently opened Windows apps to respect that. I would not expect those already open to necessarily respect it - they would need to check again, probably when starting a new print job (I think some apps like Word do so, but I don't think all apps would be guaranteed to).

Another possibility is that there is no reason a Windows app can't remember what printer it was using last time, and by default use that for any new session (rather than the Windows default printer). Also, some applications (e.g. accounting) create their own "report definitions" that include a specific Windows printer.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform