Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing to a USB printer in XP - Follow up
Message
De
20/02/2007 05:57:19
 
 
À
14/02/2007 08:39:10
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Versions des environnements
Visual FoxPro:
FoxPro Dos
OS:
Windows XP
Divers
Thread ID:
01195473
Message ID:
01197203
Vues:
14
In the end I had to tackle this problem using FCREATE() and FPUTS() cos the guy who wrote the awful original prog has output to the printer, then to the screen, then printer, etc., all scrolling, using ?? and ? (WHAT A MESS!). Trouble is, when you change back to printer (i.e. the file you've created) it starts from scratch each time, i.e. overwriting what you've output, so you don't get the full output.

Now y'all can come back and say "ah, but, have you ...?" but it's done now. :-)

Thanks again for the input

Terry

>>>>Fellow Murkins
>>>>
>>>>You may recall some time ago I enquired as to the possibility of printing to a USB printer in Xp, from a FPD26 application. I've now mananged to guide 2 different user-companies on how to do this, by putting similar to the following commands in their system-invoking DOS batch file:
>>>>__________________
>>>>@echo off
>>>>echo Disconnecting LPT1 from any other connections
>>>>net use lpt1 /delete
>>>>echo Rerouting printing to \\server\PrinterName
>>>>net use lpt1 \\server\PrinterName
>>>>pause
>>>>
>>>>* Here call to the FPD system
>>>>
>>>>@echo off
>>>>echo Disconnecting from the Server's printer
>>>>net use lpt1 /delete
>>>>pause
>>>>__________________
>>>>Trouble is, this has meant talking computer-illiterate people (bus operators) through the whole process of setting up dummy network connections, mapping shared printers, etc., and editing the .BAT, or relying on their IT dept. (if there IS one) to do it. Neither of these 2 solns is reliable.
>>>>
>>>>I was wondering if there were any way of incorporating FPD code that could achieve this, e.g. via a house-keeping routine. I understand the problem would still be the naming of printers and network connections, which is something that would be out of the control of the system anyway.
>>>>
>>>>But someone may have some cunning idea of how to do it. If you KNOW it's not possible then that's fine by me - it'll save me work and I'll need to rely on the above method.
>>>>
>>>>'ppreciate it
>>>>
>>>>Terry
>>>
>>>Terry,
>>>Did you try:
>>>
>>>set printer to \\server\PrinterName = LPT1
>>>
>>>Cetin
>>
>>Hi Cetin
>>
>>Thanks for trhe reply.
>>
>>No I haven't. I wasn't aware of your construct. I knew you could "set printer to \\server\PrinterName" but not with the "= LPT1" at the end.
>>
>>Are you saying that:
>>
>>If the user has a network connection, and has mapped the USB printer to it, then:
>>
>>set printer to \\server\PrinterName = LPT1
>>
>>... will take care of this problem? If so then that could be an easy and elegant soln.
>
>AFAIK yes but it has been a long time I last used FPDOS.
>Cetin
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform