Here's the snippet from the main prg of this project. Be advised that it was largely pre-generated by the project wizard in the misty depths of time:
RELEASE goApp
PUBLIC goApp
goApp=CREATEOBJECT("cApplication")
goApp.SetCaption("ICG Real Estate System")
goApp.cStartupMenu= "menus\remain"
goApp.cStartupForm="forms\startup"
There is a PATH statement above it in the code that includes the relative path to these files in it, but omitting the
menus\ from in front of that statement causes the default VFP menu to appear instead of the 'remain' menu, and an error msg appears saying that remain.mpr cannot be found. If I remove the relative path for the startup form, it is fine. Just the menu has the problem. I had a similar experience with some DO .. prg commands that were also in the project, and my solution to that was to either stick them out there in the PROGS folder, or to not use them. They are compiled into the project, and the DO 'ing is via the oApp.DoProgram() method of the sub-classed application object, from wzapplication in the canned appwiz library.
Since this is internally used software, I can make this work, but it is not pretty.
>Jim,
>
>Try running Menu file w/o extension (if you're using one), just DO MENUNAME
>
>HTH,
>
>-Irv.
>
>
>>The relative path info was in there, but when I took it out, then the app
really didn't find the menu, even though it was in the VFP path. Do I need to include the MPR in the project as well as the MNX? I have not tried that before.
>>>Jim,
>>>
>>>This is only a guess...
>>>
>>>In the code that runs the menu, or runs the .prg (or the set procedure command), is the path explicitely stated? For example, do you say something like:
>>>
>>>
do mrnu\menu1.mpr
>>>
>>>If so, remove the relative path from the DO command. In develop environment, you can use SET PATH to make sure it will find the procedures and menus when testing your app (when not running the .exe).
>>>
>>>>Hi all,
>>>>
>>>>I have had this problem forever, and I just made a quick-and-dirty fix to it for a long time. In order to get my compiled EXE to work on the target machine, I had to include under the home folder, a MRNU and a PROG folder with an instance of the menu file that it used and an instance of the procedure file (prg). When running, the app uses the latest version (compiled into it) and not the ancient ones in those folders. However, if they are not sitting there, it would not run.
Jim Newsom
IT Director, ICG Inc.