PRB: Application Tries to Locate Menu

Last reviewed: April 30, 1996
Article ID: Q111513
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 3.0
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5x, 2.6, 2.6a
  • Microsoft FoxPro for Windows, versions 2.5, 2.5x, 2.6, 2.6a
  • Microsoft FoxPro for Macintosh, versions 2.5x, 2.6a

SYMPTOMS

A procedure called from a menu may bring up a "Where is MENUNAME?" dialog box to locate the .MPR file.

CAUSE

A FoxPro application looks for an .MPX or .MPR file in the application when running a procedure. Therefore, it is necessary to have a valid .MPX or .MPR file. In order for the application to find the .MPX or .MPR file, a LOCFILE command is used in the system-generated code to locate the menu program. It looks for the menu program files in the following order:

   .MPX
   .MPR
   .FXP
   .PRG

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new project called TEST.

  2. Create a new menu called TEST that is created using the Quick Menu command on the Menu menu.

  3. From the File menu, choose Exit, and change the BAR# to PROCEDURE. Choose the Create button and type:

            CLEAR READ ALL
            SET SYSMENU TO DEFAULT
    
    

  4. Create an option on the File menu that has a prompt of 'First wait window'. Change BAR# to COMMAND. Type:

            WAIT WINDOW 'One'
    
    

  5. Create another option on the File menu that has a prompt of 'Second wait window'. Change BAR# to PROCEDURE. Choose the Create button and type:

            WAIT WINDOW 'Two'
    
    

  6. Build the .APP.

  7. Compile TEST.MPR into TEST.MPX.

  8. Go into Filer and rename TEST.MPR to TEST1.MPR. Also rename TEST.MPX to TEST1.MPX.

  9. Run the application. Choose the item to run the first WAIT window. Then, choose the second WAIT window.

    In FoxPro for MS-DOS or Foxpro for Windows, the dialog box "Where is TEST" should appear.

    In FoxPro for Macintosh, the system error message "Procedure 'system generated procname' not found." should appear.

  10. Press CTRL+F2 to open the Command window, and the issue the following command:

    SET SYSMENU TO DEFAULT

  11. Go into Filer and rename TEST1.MPR to TEST.MPR and rename TEST1.MPX to TEST.MPX.

Rerun the application. The "Where is TEST" dialog box should not appear now.


Additional reference words: VFoxWin 3.00 FoxMac FoxDos FoxWin 2.00 2.50
2.50a 2.50b
2.50c 2.60 2.60a "procedure not found" MBuilder
KBCategory: kbtool kbprg kbprb
KBSubcategory: FxtoolMbuilder


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 30, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.