How to Add to the System Menu as Visual FoxPro Starts

Last reviewed: April 30, 1996
Article ID: Q131289
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 3.0

SUMMARY

This article shows by example how to add items to the System menu automatically as Visual FoxPro version 3.0 starts.

MORE INFORMATION

The Example code adds menu items for the Calculator, Calendar, Filer, and Puzzle.

Step-by-Step Example

  1. Open the VFPSTART.PRG file:

    a. To do this from the MENU:

          1) From the File menu, choose Open.
          2) Change the Files of type to Program.
          3) Select VFPSTART.PRG, and choose OK.
    

    b. To do this from the Command window, issue the following command to

          bring up the Modify Program window:
    

          Modify Command VFPSTART.PRG
    

  2. Add the following source code to the beginning of the file:

    DEFINE BAR 7 OF _msystem PROMPT '\-' DEFINE BAR 8 OF _msystem PROMPT 'Ca\<lculator' ;

          MESSAGE 'Perform calculations'
    
    ON SELECTION BAR 8 OF _msystem ACTIVATE WINDOW CALCULATOR DEFINE BAR 9 OF _msystem PROMPT 'Calendar/D\<iary' ;

          MESSAGE 'Check dates and keep track of appointments'
    
    ON SELECTION BAR 9 OF _msystem ACTIVATE WINDOW CALENDAR DEFINE BAR 10 OF _msystem PROMPT '\<Filer' ;

          MESSAGE 'Manage files and directories'
    
    ON SELECTION BAR 10 OF _msystem ACTIVATE WINDOW FILER DEFINE BAR 11 OF _msystem PROMPT 'Pu\<zzle' ;

          MESSAGE 'Solve a puzzle'
    
    ON SELECTION BAR 11 OF _msystem ACTIVATE WINDOW PUZZLE SET SYSMENU SAVE

  3. Save the Program.

  4. Exit and restart FoxPro to make the changes take effect.


Additional reference words: 3.00 VFoxWin
KBCategory: kbprg kbcode
KBSubcategory: FxprgGeneral


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.