Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you change the default printer?
Message
De
22/12/1999 11:28:51
 
 
À
22/12/1999 08:36:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00307039
Message ID:
00307349
Vues:
13
>>>>I know SYS(1037) gives you a dialog. Also I know you can you SET PRINTER TO NAME GETPRINTER() but I thought there was a more efficient way to do this.
>>>
>>>Changing the Windows default printer got much easier with the release of WSH 2.0; the Wscript.Network object now has a SetDefaultPrinter method which can take the returned printer name or device name string from the VFP GETPRINTER() as a valid argument. VFP is quite happy with the reassignment done through the SetDefaultPrinter method, and it sticks!
>>
>>And if you already have a valid printer name you can use the SetDefaultPrinter method as well, correct. I'm not familiar with WSH 2.0. How do I set it up to use the SetDefaultPrinter?
>
>oWshNet = CREATEOBJ('Wscript.Network')
>oWshNet.SetDefaultPrinter(Windows printer name or device name)
>
>You need Windows Script Host at version 2.0 to use this - it is not a part of WSH 1.0

Great. Thanks for the info.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform