Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set('printer', 3)
Message
De
28/07/2008 10:52:43
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01334464
Message ID:
01334541
Vues:
7
Although it may be posible to check whether the selected printer still is active or not, I suggest something like
lcPrinter=GetPrinter()
if empty(lcPrinter)
   Set printer to default
else
   Set printer to name (lcPrinter)
endif
For RawPrint I guess you must add something like
oPrintdev1.cPrinterName = Set("Printer",3)
>Please take a look if this method of get printer is better than mine
>
>
>> lcPrinter = GetPrinter()
>> IF EMPTY(lcPrinter)
>> RETURN
>> ENDIF
>> SET PRINTER TO DEFAULT
>> oPrintdev1.cPrinterName = ALLTRIM(lcPrinter)
>
>beside my code, it includs
>
> SET PRINTER TO DEFAULT, alltrim, and if empty ()
>
>Can this be relevant to possible getprinter error ?
>
>
>It is a piece of Borissov code I picked up in foxite
>
>If he is here, I would like to hear his opinion too
>
>Moises
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform