Changing the New Project Main Menu

The New Project Main Menu is the starter menu for the new applications you create with VPM Enterprise. The options on the New Project Main Menu that come with VPM Enterprise are appropriate for a wide range of database applications. If, however, you have menu options that you put in all or most applications you develop, add them to the New Project Main Menu so VPM Enterprise can automatically include them in new applications.

Select the New Project Main Menu option on the PM-Admin/ProMatrix Setup menu to change the New Project Main Menu. VPM Enterprise displays the Visual FoxPro Menu Builder for the menu you select. Make your changes using the Menu Builder.

Tip: While you can remove options from the New Project Main menu, it is recommended that you don’t. Keep all VPM Enterprise provided menu options in the New Project Main Menu so they’ll be there when you need them. When you create a new application, just delete the VPM Enterprise menu options that you don’t need from your new application’s menu. Also,  remove the programs or forms called by the options from the application’s Visual FoxPro Project Manager. You can access an application’s Project Manager from the VPM Enterprise Tools menu.

Naming programs called by New Project Menu options

Most of the options you add to the New Project Main Menu will call programs. You can call programs from the menu command and procedure fields. If you begin the names of the programs you call with “DUSR”, VPM Enterprise will automatically replace the “USR” string in the menu command and procedure fields with the application prefix when it creates a new project. Of course, VPM Enterprise also replaces “USR” with the application prefix in the names of the files it puts into the new project as described in the previous section. Here’s what happens:

·       The names of the VPM Enterprise provided programs that VPM Enterprise calls from the New Project Main Menu begin with “SAPP”. These names serve as templates in the calling commands. When VPM Enterprise creates a new project, it must change the command and procedure fields to call programs with application-specific names. Therefore, when creating a new project, VPM Enterprise replaces the string “SAPP” in the templates with “S” plus the application prefix throughout the New Project Main Menu command and procedure fields.

·       What’s more, VPM Enterprise also replaces the string “DUSR” with “D” plus the application prefix throughout the New Project Main Menu command and procedure fields. Consequently, if you begin the names of the files you have VPM Enterprise automatically add to new projects with “DUSR”, VPM Enterprise will not only rename the files with the application prefix, but it will also change any menu calls to those files when you create a new project.

If you follow the DUSR naming convention, VPM Enterprise will automatically give the files you add to all new projects the same kind of application-specific names that VPM Enterprise gives its own files. However, the “D” in the first position of your file names will allow you to easily distinguish them from the VPM Enterprise provided files that have names beginning with “S”.

Ø To add options to the New Project Main Menu

·       Select the New Project Main Menu on the PM-Admin/Setup menu. VPM Enterprise displays the FoxPro Menu Designer for the New Project Main Menu.

·       Use the FoxPro Menu Designer to add your menu options.

·       If you want a menu option that displays a form to be disabled when the form is displayed, insert the following in the Skip For clause:

·       WVISIBLE(‘name’)

·       where “name” is the value of the Name property of the form.

·       After you finish adding menu options to the New Project Main Menu, add the programs the options call to the New Projects Objects table. See the New Project Objects section below.

More:

New Project Objects