Microsoft KB Archive/111513

= PRB: Application Tries to Locate Menu =

Article ID: 111513

Article Last Modified on 12/3/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft FoxPro 2.0
 * Microsoft FoxPro 2.6 for MS-DOS
 * Microsoft FoxPro 2.6a Standard Edition
 * Microsoft FoxPro 2.5b
 * Microsoft FoxPro 2.6 Standard Edition
 * Microsoft FoxPro 2.6a Standard Edition
 * Microsoft FoxPro 2.6a Professional Edition for Macintosh

-



This article was previously published under Q111513



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



Steps to Reproduce Behavior
 Create a new project called TEST. Create a new menu called TEST that is created using the Quick Menu command on the Menu menu.  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   Create an option on the File menu that has a prompt of 'First wait window'. Change BAR# to COMMAND. Type: WAIT WINDOW 'One'   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'  Build the .APP.</li> Compile TEST.MPR into TEST.MPX.</li> Go into Filer and rename TEST.MPR to TEST1.MPR. Also rename TEST.MPX to TEST1.MPX.</li> 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.</li>  Press CTRL+F2 to open the Command window, and the issue the following command: SET SYSMENU TO DEFAULT </li> Go into Filer and rename TEST1.MPR to TEST.MPR and rename TEST1.MPX to TEST.MPX.</li></ol>

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

Additional query words: VFoxWin FoxMac FoxDos FoxWin 2.50 2.50a 2.50b 2.50c "procedure not found" MBuilder

Keywords: KB111513

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.