Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending Data straight out the port of my choice?
Message
De
05/03/1999 14:56:43
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00194250
Message ID:
00194672
Vues:
33
>Hi all!
>We have a large application we are converting from 2.6 to VFP 5.0. One of the functions we support is interfacing with a variety of Point Of Sale equipment. Most of this is interfaces through an LPT port, and work off of specific commands sent out, much like typical printer control codes. Some of the items in question are Barcode Printers, Receipt Printers, Dipslay Poles, and Cash Drawers.
>
>Under 2.6, we basically say:
>SET PRINTER TO LPT1
>SET PRINTER ON
>? [MY COMMAND TO PRINTER]
>SET PRINTER OFF
>
>In different circumstances, we set the Printer Port to be LPT2 or LPT3 instead.
>
>Under VFP, this works basically the same, however it sends all data to the default windows printer regardless of which port we specify with SET PRINTER TO.
>
>My question is, under VFP, how can specifically tell the software to send data out a specific port regardless of which port the default printer is attached to?
>
>Thanks for the help!
>
>Paul R. Moon

Create a text file of your printer output then copy the file to the port.

ex:

set printer to myfile.txt
set print on
? chr(7)
set print off
set printer to
copy file myfile.txt to lpt1.dos

The lpt1.dos designator tells Windows to bypass Print Manager and send the file directly to the port.

HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform