How to Add to the System Menu as Visual FoxPro Starts (131289)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0

This article was previously published under Q131289

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:
    1. 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.
    2. 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.

Modification Type:MajorLast Reviewed:2/15/2000
Keywords:kbcode KB131289 kbAudDeveloper