Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need to get and set windows default printer
Message
De
27/11/2006 21:06:24
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01172779
Message ID:
01172801
Vues:
21
>>We are doing a Fox 2.0 DOS to VFP9 conversion. There are more reports than you can shake a stick at. They are written using ?? and ? to send raw data to the printer. I have been able to get this to work with the default printer but need to be able to get the current default printer, set the default to a printer for wide column reports and then set it back to the original default.
>
>
>? SET("PRINTER",2)    && Default Windows Printer
>? SET("PRINTER",3)    && Default VFP Printer
>...
>DECLARE Integer SetDefaultPrinter IN WINSPOOL.DRV String
>...
>IF SetDefaultPrinter(lcPrinter) = 0
>  * Cannot change default Windows Printer
>  RETURN .F.
>ENDIF	
>...
>
I've tried this and can't seem to get any response from Winspool. Any insight would be appreciated.

thanks, jeff
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform