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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing external files from Foxpro

Status
Not open for further replies.

sarahblovely

Programmer
Dec 9, 2002
8
0
0
CA
Is there a way to get Foxpro to print files that are not reports or programs etc. I need to create an entry screen were the user selects a work order and can print all associated documentation including drawings and parts lists. These could be pdf files or CAD files. What command would make it possible for Foxpro to print these non Foxpro files without converting them or anything? Is this possible?
 
Sarah,
It's not really as easy in FPW as it would be in VFP, but if the application has a command line capability, then you could use it. e.g. The following will print any text file (remember the 8.3 filename limitations):
Code:
run /n notepad.exe /p c:\autoexec.bat
Rick
 
I have been reading about _shellexecute() in VFP. Can one run this in older Foxpro?
 
Since FPW can't directly call 32-bit DLL's you'll need to use CALL32. The CALL32.ZIP file is on Rick Strahl's site at and includes the necessary files and some demo code.

Note: Back when I was using this, I found that while CALL32 works for many 32-bit API calls, others can fail and "hang" the program / workstation - use only when necessary and test on all potential OS platforms.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top