Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set Printer To LPT2 & Net Use
Message
De
13/06/2005 13:19:33
 
 
À
07/06/2005 14:00:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01021031
Message ID:
01022840
Vues:
11
Whenever you attempt to print to a printer that does not exist (you must use SET PRINTER TO NAME in VFP) then VFP will print to the windows default printer.
You must have a valid windows printer name on the machine that you are printing to, even in Windows 98.
For Windows 98, make sure the printer share name is 8 characters or less for your test. Then test the below:
lcorgprinter = SET('PRINTER',3)  && default VFP printer
lcprinter = GETPRINTER()         && select the Zebra printer here
SET PRINTER TO NAME (lcprinter)
*Print the labels then set the printer back
SET PRINTER TO NAME (lcorgprinter)
If that works, then there must be a difference between the actual printer name in Windows 98 and the one stored in Our_Label_PrinterName_Parameter.

>VFP 8.0 SP1
>We want to switch printers after an invoice print (Dot Matrix) so we can print some labels on a Zebra Label Printer. It all works well in WinXp & 2000 but not Win98 and unfortunately our customers won't upgrade for a while yet. The following code works in XP & 2000.
>
>Set Printer To Name (Our_Label_PrinterName_Parameter)
>
>So instead we are trying the DOS "Net Use" command before we print to capture the port and re-direct it to the Zebra Network Printer.
>
>Set Printer To LPT3 (which we have already captured) always prints on the windows default printer and does not go out to the Captured Printer. The strange thing about this is issuing the Set Printer To LPT3 in Fox for DOS works fine, any suggestions.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform