Here is how I set up PrintFile and my application:
Installation of PrintFile for use with FoxPro 2.6 DOS
Download PrintFile and unzip it to some directory
(currently on the network in H:\shared\PrintFile)
Run Setup.exe
Turn off "Create startup menu item\..." (you may want this)
This installs PrintFile into c:\Program Files\PrintFile
Run PrintFile
Click on [Settings...]
Set "Enable spooler function"
Set "Show icon on the taskbar"
Reset all other options
Click on [Text file...]
Set "Send to printer"
Click on [OK]
Click on [Save]
Click on [Exit]
Create a shortcut on the Desktop
Point to "C:\Program Files\PrintFile\PRFILE32.EXE" in the target
Name the shortcut "Print File Spooler"
Add " /s:c:\foxpro26\spooler\*.TXT" to the target, no quotes
Copy the shortcut to the User's Startup directory
Create a directory: C:\Foxpro26\Spooler\ (or wherever you want it)
Restart the computer or re-login. This starts and puts PrintFile on taskbar
Any file with the .txt extension put into the c:\foxpro26\spooler directory will be printed to the Default printer
In FoxPro 2.6 DOS application:
Make sure settings in Purchasing Program are set to LPT1
Code to send P.O. .txt file to spooler directory:
IF gnParaPort = 1
mpath = 'C:\FOXPRO26\SPOOLER\'
gcFileName = mpath + 'PO' + alltrim(gcPurNo) + ".TXT"
REPORT FORMAT REQPRINT.FRX TO FILE &gcFileName PDSETUP NOCONSOLE
ELSE
SET PRINTER TO LPT2
ENDIF
I hope this helps anyone interested in printing to USB ports from FoxPro 2.6 DOS. This is a nice little program and the author, Peter Lerup, should get a prize for this one.
CU
Tony Scarpelli
Clinical Engineering Dept.
Maine Medical Center
Portland, Maine 04102