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

Printing via menu command

Status
Not open for further replies.

louie728

Programmer
Feb 4, 2004
27
US
Hello all,

I am using the codebook framework and have added a menu item print, just like the regular VFP ide print. The problem is that I do not know the command to execute in the menu to print. I have tried to use SYS(1500,'_MFI_SYSPRINT','_MSM_FILE') to no avail since it will not work from within my frame work. What I am basically trying to accomplish is writing info to a log file and then opening the log file via modi command <logfile> at this point I want the user to be able to select print and print out the file if they would like.

TIA,

Lou
 
Hi Lou,

Log files are for me, not my users. If the app can continue, well and good, if not, inform the user and exit.

Regards,

Mike
 
Thanks for the reply Mike, but the AKA log file is an indication for the user in this instance telling him what has been processed. Printing is essential.

Thanks
 
Is the Log file a table? Why not do a report and Print Preview? User could print, or just exit.

Regards,

Mike
 
Mike,
The log file is actually a cursor so yes that would work, but I really just wanted to print a text file. I did a workaround by launching wordpad , but I would still want to know how I can add the regular old print feature.


DECLARE INTEGER ShellExecute IN shell32.dll ;
INTEGER hndWin, ;
STRING cAction, ;
STRING cFileName, ;
STRING cParams, ;
STRING cDir, ;
INTEGER nShowWin

cParams = <MyLogfile>
cFileName = "WORDPAD.EXE"
cAction = "open"

ShellExecute(0,cAction,cFileName ,cParams,"",1)


Thanks,

Lou
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top