Vince Teachout wrote: > I just finished resolving a problem I had where I needed to DO FORM X on > Startup, and also have it available as a menu option. Form X has 2 > buttons, one that does DO FORM Y, and one DO FORM Z. > > The form would not start up during the startup code, with a "form not > found error", but all forms would work fine if called from the menu. The > menu code was "DO FORM X". > > I had been trying to implement a generic startup tasks function, data > driven, that would do whatever was in a DBF field via VFP ExecScript(). > The code in the field to be run by ExecScript() was also "DO FORM X". > > Apparently though, ExecScript() doesn't know anything about any forms > compiled into the EXE - I would have to have an actual physical form, > and specify the RUNTIME path, which is not possible in our case. Of > course, it couldn't find the other two forms, either. > > For now, I hard-coded it, which will get me by, but is there a way I can > make these compiled forms visible to ExecScript()? > > Thanks. > Hi Vince,
I was thinking about doing this for a while, so just tried something on my system. I use VFP7 and use a standard menu which has calls to DO FORM X etc. I have a load of setup code then: DO MENUS\MYMENU.MPR ON SHUTDOWN do cleanup READ EVENTS In the startup code of the menu system, I just added a line DO FORM X and it works fine for me. Where were you calling your startup form from? Peter _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

