Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to fast print to Dot-matrix printer (and not generic
Message
De
01/06/1999 04:36:56
 
 
À
18/05/1999 02:29:14
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00219285
Message ID:
00224815
Vues:
16
>Elbert,
>
>The most efficient way to make caracter based documents, is to write the invoice to a text file first (May be handy to store the in a separate directory for later use).
>
>SET PRINTER TO (cFile)
>SET PRINTER ON
>SET CONSOLE OFF
>
>??? Controlcodes
>? cText
>??? Controlcodes
>
>SET CONSOLE ON
>SET PRINTER OFF
>SET PRINTER TO
>
>After this you can write the text file to a LPT port with the following command.
>
>COPY (cFile) TO Lpt1.dos
>
>If you're a network and the printers are not attached to a LPT port you can use:
>
>! NET USE LPT9 \\Servername\printername /yes
>(of course you also could use the waddconnection api call)
>
>command to attach the printer to LPT9

Rather than this, you can use the Win32 API call CopyFile() to the UNC of the network printer or port - I posted code for this a couple of weeks ago. This has the advantage of working identically cross-platform, and avoiding having to explicitly attach the printer to the port via NET USE or one of the WNet API calls.

>
>Walter,
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform