Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printer settings command
Message
De
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:
01647153
Vues:
50
This message has been marked as a message which has helped to the initial question of the thread.
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
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform