Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printer settings command
Message
From
30/01/2017 06:20:58
 
 
To
30/01/2017 05:45:10
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2008 R2
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01647147
Message ID:
01647155
Views:
29
Not a bad solution, I only wonder if the user stares at teh first screen looking for the orientation setting.
Is there a code to set the orientation_ With PRTINFO() I can get the current Setting, but not sure how to change orientation (or paper source) programmatically.

If that were possible I could create a nicer interface for the user.


>What I do for general switching:
>
>
>LOCAL;
> lcPrinter   AS CHARACTER,;
> llError     AS BOOLEAN,;
> loException AS EXCEPTION
>
>TRY
>  IF VAL(OS(3))*100+VAL(OS(4))>=600 THEN
>   lcPrinter = GETPRINTER()
>   IF !EMPTY(lcPrinter) THEN
>    SET PRINTER TO NAME (lcPrinter)
>    =SYS(1037)
>   ENDIF &&!EMPTY(lcPrinter)
>  ELSE &&Val(Os(3))*100+Val(Os(4))>=600
>   =SYS(1037)
>  ENDIF &&Val(Os(3))*100+Val(Os(4))>=600
> CATCH TO loException WHEN loException.ERRORNO=125
>* no printer found
>  llError = True
> CATCH TO loException
>* other error, add your handler
>ENDTRY
>
Christian Isberner
Software Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform