How to Prevent Access to a System Menu from a Screen

Last reviewed: April 30, 1996
Article ID: Q110479
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, and 2.5b
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a, and 2.5b

SUMMARY

When you are combining a menu and a screen, you can prevent access to all or some of the menu options, as described below.

MORE INFORMATION

To Disable Portions of the Menu System

Using the following steps, you can disable specific pads, popups, or bars of popups in a menu system.

NOTE: This procedure can be used in conjunction with or instead of a READ MODAL command.

  1. In the Menu Builder, create the menu system.

  2. Select the item you want to disable.

  3. Select the Options box. In the Prompt Options dialog box, select the Skip For check box, and type the following as the Skip For expression:

          RDLEVEL()>1
    

    NOTE: If the application is not controlled by a foundation READ, the expression should be:

          RDLEVEL()>=1
    

  4. Repeat steps 2 and 3 for every item that needs to be disabled.

To Disable the Entire System Menu

NOTE: This procedure can be used in conjunction with or instead of a READ MODAL command.

  1. Create the screen you want to combine with your menu system.

  2. Add a WHEN clause to the READ command. It should be marked as a Procedure and contain the following command to disable the system menu:

           SET SKIP OF MENU _MSYSMENU .T.
    

  3. In the screen's Cleanup code, add the following command to activate the system menu again:

          SET SKIP OF MENU _MSYSMENU .F.
    

REFERENCES

"Language Reference," pages L3-779 and L3-1001


Additional reference words: MBuilder FoxDos FoxWin 2.50 2.50a 2.50b dim
unavailable
popup
KBCategory: kbprg
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.