Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Resetting the Windows Default Printer
Message
 
 
À
13/11/2001 10:20:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00580881
Message ID:
00580892
Vues:
20
>In VFP 6.0, is there a way to reset the Windows Default Printer in code rather than using a dialog box?
>
>We have a function that saves the current Windows Default Printer to a variable, uses the Microsoft Common Dialog Box to select a new Windows Default Printer for printing a report, then I need to reset the Windows Default Printer back to the original value. So far, I have not found a way to do it.
>
>We need to use the Microsoft Common Dialog Box so we can enable/disable certain controls, and be able to pass a default number of copies into the dialog.
>
You can change default windows printer using WSH
lcSaveWinDefPrinter = SET("PRINTER", 2)
loNet = CREATEOBJECT("WScript.Network")
loNet.SetDefaultPrinter("\\Server\Print1")
...
loNet.SetDefaultPrinter(lcSaveWinDefPrinter
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform