Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change default printer and print to it
Message
 
 
À
06/04/2012 16:53:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01540561
Message ID:
01540571
Vues:
53
See if http://www.berezniker.com/content/pages/visual-foxpro/changing-windows-default-printer helps

>I'm creating an app where existing PDF files will print based on sales data. The PDF files are already created and sitting in a folder on the network. I'm using ShellExecute to print the PDFs, and need them to print to a specific printer which isn't likely to be the user's default printer.
>
>I found the code to change the default printer using WMI (Thanks Sergey!) but the problem is that ShellExecute doesn't recognize that change and still sends the PDF to the original default printer. I tried creating a separate EXE that gets called from the first program that changes the default printer but that didn't work either (throwing darts at this point).
>
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform