ID: Q109477
The information in this article applies to:
Depending on how a program is executed, PROGRAM(0) and PROGRAM(1) may not return the expected results. For example, when a program is executed from the Run menu, the return values will be "ON..." instead of the executing program name.
If you are using these functions to obtain the main program name, remove FOXSTART.APP from the FoxPro folder. Doing this keeps the Run menu from appearing when FoxPro is restarted and thus removes the ability to choose Application from the Run menu in order to start a program.
The functions PROGRAM(0) and PROGRAM(1) return the name of the master program (the highest-level program).
1. Create a program file and include the following:
WAIT WINDOW PROGRAM(0)
WAIT WINDOW PROGRAM(1)
2. From the Program menu, choose Do, and select the above program.
PROGRAM(0) and PROGRAM(1) return the currently executing program.
3. From the Run menu, choose Application, and select the above program.
PROGRAM(0) and PROGRAM(1) both return "ON..." instead of the program
name.
Additional reference words: FoxMac 2.50b
KBCategory: kbprg kbprb
KBSubcategory:
Last Reviewed: May 17, 1996