Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I send a file directly to a printer through a po
Message
 
 
À
20/12/2000 00:40:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00455349
Message ID:
00455426
Vues:
26
>Hi friends,
>
>I need to send the contents of a text file to a parallel port so that it goes directly to the printer. I tried with the Windows API function COPYFILE, it works great at copying files to diferent locations but when I try to 'copy' a file to a port (for example LPT1) it doesn't work although the documentation that I found in UT for this function explains that I can do it. However when I try it returns the code 0 that means that an error occurred and nothing happens. Am I doing something wrong? Is there any other way to do it? I tried with VFP'S COPY FILE but it doesn't work either. Now I am doing it with RUN through DOS but the black window that appears is very annoying and the users don't like it. Any help would be very appreciatted.
>
>Luis Guerra

lcStr=filetostr('yourfile')
set printer on
??? lcStr

Got this from DF, as I recall correctly. Works fine on my local machine here.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform