Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printer settings command
Message
 
 
À
30/01/2017 05:45:10
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2008 R2
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01647147
Message ID:
01647155
Vues:
30
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform