How to gain access to the View menu pad in an .exe file (142940)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows, Professional Edition 3.0
  • Microsoft Visual FoxPro for Windows, Professional Edition 3.0b
  • Microsoft Visual FoxPro for Windows 6.0
  • Microsoft Visual FoxPro for Windows 7.0
  • Microsoft Visual FoxPro 8.0
  • Microsoft Visual FoxPro 9.0 Professional Edition

This article was previously published under Q142940

SUMMARY

When the Report Designer is open, the View menu allows interactive access to the Data Environment, the Color Palette toolbar, and the Report Controls toolbar. By default, this menu is not displayed when you modify a report in a Visual FoxPro executable (.exe file). It is however available. This article shows by example how to display the View menu when you modify a report.

MORE INFORMATION

The following sample program adds the View menu to the Visual FoxPro system menu. Use these steps to run this program in an .exe file.

  1. Copy the following code into a program file (.prg):
          DEFINE PAD _msm_view OF _MSYSMENU after _MSM_edit PROMPT "\<View" ;
           COLOR SCHEME 3 ;
          KEY ALT+V, "" ;
          MESSAGE "Changes display options"
          ON PAD _msm_view OF _MSYSMENU ACTIVATE POPUP _mview
    
          DEFINE POPUP _mview MARGIN RELATIVE SHADOW COLOR SCHEME 4
          DEFINE BAR _mvi_toolb OF _mview PROMPT "\<Toolbars..." ;
            MESSAGE "Shows, hides, or customizes toolbars"
    
          CREATE REPORT
    						
  2. Create a project.
  3. Add the program to the project by following these steps:

    1. Select the Code tab.
    2. Click Programs.
    3. Click the Add button.
    4. Add the program, and then click OK.
  4. Build the .exe file by clicking Build and selecting Build Executable.
  5. Quit Visual FoxPro.
  6. In the File Manager or the Windows Explorer, double-click the file you just created. Visual FoxPro starts and the report designer opens. The View menu is available.
This technique ensures that the design toolbars are available even if users close them during a session.

Modification Type:MajorLast Reviewed:2/11/2005
Keywords:kbcode KB142940