Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set Printer to the Default Printer
Message
De
07/08/1999 15:59:47
 
 
À
06/08/1999 14:41:39
Kenny Norton
Dataforce Systems Inc
Atlanta, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00250825
Message ID:
00251147
Vues:
13
>I am displaying a form asking the user to select a printer with GetPrinter(). I want to set this choice to the system default printer, how can I accomplish this ?

Hi Kenny:

Seems to me that SET('Printer') by itself returns the windows default printer, and SET('Printer,2') or SET('Printer,3') returns the currently selected VFP-6 printer name (as WIndows sees it from the name of the printer icon as installed on the current PC workstation).

You can then invoke SET PRINTER TO NAME (xxxxxx) (do not enclose the actual name in quotes -- but you might need to monkey with enclosing the returned name inside of parantheses if it has any embedded spaces in the name itself) to set the VFP printer to the one you want. Some quick testing from the command window should show you how it works.

Remember, this does not change the Windows default printer, just the one that VFP uses. To change the Windows default printer for all applications you will need to manipulate the registry. I think there is something in FAQ or FILES section on that. Personally, I try to avoid mucking with the registry unless there is an overwhelming need...

HTH

Rob
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform