Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Current Printer Value - VFP 5.0
Message
 
 
À
05/04/2002 15:42:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00641611
Message ID:
00644762
Vues:
21
This message has been marked as the solution to the initial question of the thread.
>Anyone know of a routine that can give the equivalent of SET("PRINTER", 3) in VFP 5.0? I've got to retrofit some working 6.0 / 7.0 code back into a 5.0 application. <s>
>
>Rick

Just an idea. You can create a quick report and extract the printer name from it's EXPR field. Something like
*Function SetPrinter3()
LOCAL LcCursorName, lcReportName, lnLine, lcPrinterName, lcStr
LcCursorName = Sys(2015)
lcReportName = Sys(2015)
CREATE CURSOR (lcCursorName) ( temp C(1))
CREATE REPORT (lcReportName ) FROM (lcCursorName )
USE (lcReportName + ".FRX")
lnLine = Atline("DEVICE=", Expr)
lcStr = Mline(Expr, lnLine)
lcPrinterName = Substr( lcStr,  At("=", lcStr )+1)
USE IN (lcReportName)
ERASE (lcReportName + ".FRX")
ERASE (lcReportName + ".FRT")
RETURN UPPER(lcPrinterName)
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform