Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PRINTING in FPD 2.6 TO COM1:

Status
Not open for further replies.

peterasf

Technical User
Jul 1, 2002
23
BE
I have an old HP line-printer (HP2562) hooked up to a PC running Foxpro 2.6 under DOS (no Windows installed). Unfortunately I cannot find a way to get the printer working from FoxPro, not even with a !dir >> com1: . FoxPro seems to change the com1 settings ? or blocks output to com1:

From DOS, typing DIR >> COM1: gets the printer printing.

The printer is linked through COM1: RS-232 9600,N,8,1

Can someone give me a hint ? Thanks !
 
Have you tried:
SET PRINTER TO COM1
SET PRINTER ON
DIR TO PRINTER
SET PRINTER OFF
SET PRINTER TO

Rick
 
We can try this 2 ways:
1- try using the dos command before invoking the set printer command :
lc_port = "MODE COM1 96,N,8,1"
RUN &LC_PORT
then issue the command :
SET PRINTER TO com1
( don' forget to reset your printer mode command if needed )
2-lc_port = "MODE COM1 96,N,8,1"
RUN &LC_PORT
RUN "MODE LPT1=COM1"
All subsequents call to print will be re-routed to com1 (assuming printing is set to lpt1)

Hope this helps,

EMC
 
Thank you !

I will try these solutions and let you know the result as soon as possible.

PW
 
In your autoexec.bat file put the two lines....

mode com1 96,n,8,1
mode lpt2=com1

You now have a 2nd LPT port.
To test it at the c:\. prompt type....

type autoexec.bat >lpt2

and your autoexec.bat file should print.
In foxpro set printer to LPT2
That's it.
 
I have found it necessary to redirect LPT3 to
Comm port and do so successfully BUT cant seem
to get around a 30-60 secind delay b4 printing starts.
Any solution would be appreciated.
 
You MUST switch off share printer in Windows.
Then go into printer properties and in SPOOL settings set PRINT DIRECT TO PORT (don't spool).
In PORT settings take the tick out of SPOOL MSDOS print jobs.
Note that on a network, if you offer a printer to be shared spooling can not be switched off.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top