Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Working out the current default printer
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01300801
Message ID:
01301004
Vues:
15
Getting the default printer name is no problem. What is a problem is remembering what printer a user printed to. By that, I mean that if the user has printer 1 set as default, but prints something and chooses printer 2, I'd like to be able to determine that they printed to printer 2 and bring that up as the selected printer next time they print. Can't do it. The default printer has not changed, so the next time they print it will come up as the selected printer. You can use SET PRINTER as you mention, but you have to have a separate interface for this. If they set it to printer 2 via this technique, then they print to printer 3, you can't "remember" that and bring up printer 3 as the default printer the next time because you can't tell what printer they printed to. You're always hamstrung by not knowing the printer they actually printed to, which may not be the default and may not be the one that was set with SET PRINTER.


>I know there's an API call through the WSH that will give you the installed printer names but I don't remember if it will tell you which one is currently set as default.
>
>And the command "Set Printer to Name [printername]" should work, although it's been awhile since I last used it.
>
>>>Hi
>>>
>>>What's the easiest way to work out the name of the default printer?
>>
>>The problem in all of this is determining which printer a user printed to. I'd like to just use the PROMPT keyword in a REPORT FORM command and let the user choose any printer they want to. Then I'd like to be able to find out which one they chose and set that as the VFP default printer, but there's no way to do that in VFP and I'm not even sure of an API call to do it. So you have to do something like make them choose the printer first, then print to it, which is a little alien to the normal way that users are used to doing it. Indicate they want to print something, then choose the printer.
eCost.com continues to rip people off
Check their rating at ResellerRatings.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform