Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RAWPRINT5.FLL
Message
From
25/09/1999 13:40:45
 
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Miscellaneous
Thread ID:
00268322
Message ID:
00268965
Views:
25
Here's the formatted code, I left out the HTML tags the first time.
*-------------------------------------------------------
* Procedure...: CallRawPrint
*
* Author......: Rick Borup
*
* Abstract....: Use RAWPRINT5.FLL to print an ASCII file directly to the printer.
*
* Parameters..: tcFileName - the name of the ASCII file to print
*
PROCEDURE CallRawPrint(tcFileName)
if type("tcFileName") != "C"
   MESSAGEBOX("Report cannot be printed because the print " + ;
              "file name is missing or invalid.", ;
              MB_ICONEXCLAMATION,"Error")
   RETURN
endif
local lcPrinterName
lcPrinterName = GetPrinter()
IF EMPTY(lcPrinterName)
   RETURN
ENDIF
set printer to name "&lcPrinterName"
set library to rawprint5.fll additive
if !rawprint(lcPrinterName, tcFileName)
   *  If RawPrint returned .F. then there was an error.
   MESSAGEBOX("There was an error attempting to print report " + ;
              upper(alltrim(tcFileName)), ;
              MB_ICONEXCLAMATION, "Error")
endif
release library rawprint5.fll
RETURN
ENDPROC && CallRawPrint()
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Previous
Reply
Map
View

Click here to load this message in the networking platform