FIX: Modal Form and SET SYSMENU OFF Cause Menu to Disappear (165168)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 5.0

This article was previously published under Q165168

SYMPTOMS

If a Top-Level menu appears in a Top-Level form that calls a modal form with the system menu set off, closing the modal form causes the Top-Level form menu to disappear.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been corrected in Visual FoxPro 5.0a for Windows.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a Top-Level menu using the Menu Builder. Select General Options from the View menu, and then select "Top-Level Form" in the resulting dialog box. Name the menu Ztop.
  2. Create a modal form called Zmodal and set the following properties:
          ShowWindow = 1-In Top-Level Form
          WindowType = 1-Modal
    						
  3. Create a Top-Level form called Ztopform and set the following properties:
          ShowWindow = 2-As Top-Level Form
    						
  4. In the DblClick Event of the Ztopform form, place the following code:
          DO Form Zmodal
    						
  5. In the Init of the Ztopform form, place the following code:
          DO Ztop.mpr WITH THISFORM,.T.
    						
  6. Close the form and type the following in the Command window:
          SET SYSMENU OFF
    						
  7. Run the Ztopform and double-click the form to invoke the modal form.
  8. Close the modal form. In Visual FoxPro 5.0, the menu on the Top-Level form disappears.

Modification Type:MajorLast Reviewed:10/16/2002
Keywords:kbBug kbvfp500aFIX KB165168