How to Build an Application from an Existing Screen Set

Last reviewed: April 30, 1996
Article ID: Q117786
The information in this article applies to:
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5x, 2.6
  • Microsoft FoxPro for Windows, versions 2.5x, 2.6
  • Microsoft FoxPro for Macintosh, versions 2.5b, 2.5c, 2.6a
  • Microsoft FoxPro for UNIX, version 2.6

SUMMARY

This article shows how to incorporate a foundation READ within a screen set. With these modifications, this screen set can become a full application with an active menu bar. You can use this same method for previous versions of FoxPro, back to FoxPro version 2.0 for MS-DOS.

This is not the same as the implementation of the foundation READ found in EX1.APP and EX2.APP. Instead of a READ VALID, it is using the READ CYCLE of the screen set to hold up the menu.

MORE INFORMATION

A screen set with a control bar allows you to navigate through records, but does not give you access a menu bar. Having access to a menu bar requires a foundation READ. (NOTE: If this one screen set is the only source of data entry required, you do not have to have the foundation READ separate from the screen set.)

Example

Add the existing screen set to a new project. Generate the project, and make sure the data screens operate as you want. After your screen set is complete, you can add the menu. To do this, make the following modifications in the main screen of the screen set:

  1. In the Setup snippet, add the following lines at the bottom of the snippet:

          *added to screen set Setup
          PUSH MENU _msysmenu
          menu = SET("SYSMENU")
          SET SYSMENU AUTOMATIC
    

          *This variable is required only for screen sets
          *that originated from FoxApp applications.
    

          bailout=.f.
    

          *Application menu added
          DO <yourmenu>.mpr
    

  2. In the Cleanup snippet of the top screen, add the following lines to the top of the snippet:

          *Added to first lines of screen set cleanup
          POP MENU _msysmenu
          SET SYSMENU &menu
          *End of addition
    

  3. In the Exit option on your menu, add the following as the Exit procedure:

          m.bailout=.T.
          CLEAR READ
    

The screen set will then act as the foundation READ for the application.


Additional reference words: FoxUnix FoxMac FoxDos FoxWin 2.00
2.50 2.50a
2.50b 2.60
2.60a
screenset
KBCategory: kbprg
KBSubcategory: FxtoolGeneral


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.