Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to print a stand-alone text file from Fox?
Message
De
07/10/2009 09:25:37
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
07/10/2009 09:14:48
Ken Zinssar
Newkirk Products Inc
Albany, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Divers
Thread ID:
01428034
Message ID:
01428037
Vues:
62
>Other than the Type command, is there a better way to print a stand-alone text file from Fox?
>
>TIA!

I am not sure what is the BEST option; here are some alternatives; most alternatives require the printer to have text capabilities. The GDI printers (cheap printers) don't have those.

  • In the past, I have used the COPY command. I am not sure whether that still works in a Windows environment.
  • The "???" command definitely works. See sample code 1, below.
  • You can of course generate your text in a variable in the first place, and send to the printer with "???".
  • If you produce data programmatically, I suggest you take a look at some reporting class to assist you. One of them is my download #9991.
    * Sample code 1
    * Assuming the text is in file "report.txt"
    * Printer setup codes are optional, but they will ensure the printer is reset to some standard state; also,
    * you can define a font, for example, 17 DPI for narrow print.
    ??? lcPrinterSetupCodes + FileToStr("report.txt")
    Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
  • Précédent
    Répondre
    Fil
    Voir

    Click here to load this message in the networking platform