Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the best way to set the Default Printer
Message
De
10/08/2010 13:55:38
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00870520
Message ID:
01476022
Vues:
75
Thanks Naomi. I'm looking at it now.

>Hi Debra,
>
>Check the comment to the blog post. I'm thinking the Adobe Acrobat starts when you print it the first time and it doesn't exit when you try to print the second, that's why it's only printed to the first printer. I believe I recently saw a relevant thread (in Russian) on www.foxclub.ru website.
>
>You probably need to kill Adobe after you printed the first time to make it work.
>
>>Hi Sergey,
>>
>>I'm having a problem setting the default system windows printer.
>>
>>
>>lcprintername = lcdefaultprinter 
>>IF SetDefaultPrinter(lcprintername) = 0
>>	SELECT(lnalias)
>>	messagebox("Cannot change the default windows printer.", 0+16+0,"Error")
>>	return .f.
>>ENDIF
>>
>>ShellExecute(0,'Print',lcfile,"","",1)
>>
>>
>>
>>lcprintername = lcotherprinter 
>>IF SetDefaultPrinter(lcotherprinter) = 0
>>	SELECT(lnalias)
>>	messagebox("Cannot change the default windows printer.", 0+16+0,"Error")
>>	return .f.
>>ENDIF
>>
>>ShellExecute(0,'Print',lcfile,"","",1)
>>
>>
>>Both times the file gets printed to the first printer.
>>Do you know what's going on with this?
>>Even if I put a delay between them, it doesn't work.
>>If I put lcotherprinter first, both times it prints to lcotherprinter.
>>
>>I can't seem to switch the system printer and print using the shell execute successfully. I'm printing a pdf file.
>>
>>
>>Actually, I print to a bullzip pdf printer first and create the pdf.
>>Then, I need to switch to a selected printer to print a hard copy of the pdf.
>>
>>Can you tell what's wrong here? Doesn't the shell execute do a print to the default windows printer?
>>Is there something else I need to set? Or is this a timing issue?
>>
>>Any help would be greatly appreciated.
>>
>>Deb
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform