Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Current Printer Value - VFP 5.0
Message
 
 
To
05/04/2002 15:42:49
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00641611
Message ID:
00644762
Views:
19
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform