Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set('printer', 3)
Message
From
28/07/2008 10:52:43
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01334464
Message ID:
01334541
Views:
8
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
Previous
Reply
Map
View

Click here to load this message in the networking platform