PRB: Closing SDI (Top-Level) Form Does Not Release MenuLast reviewed: January 10, 1997Article ID: Q156089 |
The information in this article applies to:
SYMPTOMSIf a Top-Level, or single document interface (SDI), form uses a menu, this menu is not automatically released when the form is released.
WORKAROUNDIn order for a menu to be released, you must issue the RELEASE MENUS command. If you want the menu to be released when the form is closed, issue the command as follows in the Destroy method of the form:
RELEASE MENUS <menuname> EXTENDED STATUSThis behavior is by design.
MORE INFORMATIONWith Visual FoxPro 5.0 you can create forms that appear outside of (or in lieu of) the FoxPro desktop and that appear in the task list or on the task bar. These forms are called Top-Level, or SDI, forms and require setting the form's ShowWindow property to "2 - As Top-Level Form." You can add menus, toolbars, and child forms to these forms the same way you add them to the Visual FoxPro desktop in this and previous versions of Visual FoxPro. There is a sample SDI form in the Solution sample application that displays these new capabilities. Access the Solution sample by clicking Sample Applications from the Help menu in the Visual FoxPro 5.0. This brings up the Sample Applications Overview help topic. Start the Solution sample by clicking Run, which is to the right of Solutions Sample under Access. You can access the SDI form example within the Solution application by clicking Forms to expand the folder tree in the Visual FoxPro Solutions dialog box. Then click "Create an SDI form" and the Run Sample button to run the form. Alternately, you can click the See Code button to display the form in the Form Designer. You must explicitly release the menu so you can reuse the menu if desired.
Steps to Reproduce Behavior
RELEASE MENUS (This.Name) EXTENDEDNOTE: This technique is explained in more detail in the header of any .mpr file created when you generate a Top-Level menu.
|
KBCategory: kbtool kbui kbprb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |