How to Gain Access to the View Menu in an .EXE File

Last reviewed: January 23, 1996
Article ID: Q142940
The information in this article applies to:
  • Professional Edition of Microsoft Visual FoxPro for Windows, versions 3.0 and 3.0b

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:

    a. Select the Code tab. b. Click Programs. c. Click the Add button. d. Add the program, and 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 is opened. The View menu is available.

This technique ensures that the design toolbars are available even if users close them during a session.


Additional reference words: 3.00 3.00b VFoxWin
KBCategory: kbtool kbhowto kbcode
KBSubcategory: FxtoolReportdes


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: January 23, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.