Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RAWPRINT5.FLL
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Divers
Thread ID:
00268322
Message ID:
00268965
Vues:
26
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform