Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the best way to set the Default Printer
Message
De
13/08/2010 10:56:01
 
 
À
13/08/2010 10:18:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00870520
Message ID:
01476473
Vues:
273
This message has been marked as the solution to the initial question of the thread.
>It seems to be working if I close adobe and then set the windows system default printer.
>
>How do you suggest I accomplish this task?
>
> I need to print to a bullzip pdf printer first to create a pdf.
>Then, I need to switch to a selected printer to print a hard copy of the pdf.
>
>
>

Debra,

I have not followed the whole thread - but try this

- no need to change the default windows printer
- pass the printer name to ShellExecute as a parameter
	declare integer GetDesktopWindow IN win32api

	Declare long ShellExecute in shell32.dll  ;
		    long hwnd, ;
		    string lpszOp, ;
		    string lpszFile, ;
		    string lpszParams, ;
		    string lpszDir, ;
		    long nShowCmd
			    
	local pdfFile, printerName 
	pdfFile = 'd:\tmp\0xx.pdf'
	pdfFile = 'd:\tmp\aaa.pdf'
	
	printerName = 'HP Photosmart C6100 series'
	&& printerName = 'Bullzip PDF Printer'
	
	
	
	?ShellExecute(GetDesktopWindow(), 'printto', m.pdfFile, '"' + m.printerName + '"', null, 7)
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform