Generating Screen Code by Directly Calling GENSCRN.PRG

Last reviewed: April 29, 1996
Article ID: Q96290
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, and 2.5a

SUMMARY

To generate the screen code for an .SCX file, choose Generate from the Program menu. The program that is used to generate the screen code file (.SPR) is called GENSCRN.PRG. Screens generated with GENSCRN.PRG are given the default filename of <SCREEN-NAME>.SPR.

MORE INFORMATION

The GENSCRN program can also be called directly to generate the screen code file. To do this, a project table file (.PJX/.PJT) must be available. The GENSCRN program will take two parameters: the name/location of the project, and the record number in the project table file (.PJX/.PJT) of the screen code. For example:

   DO GENSCRN WITH "P_NAME",3

To directly call GENSCRN, do the following:

  1. Create a screen file (CUSTOMER.SCX).

  2. Create a project file (TEST.PJX).

  3. Add the screen (CUSTOMER.SCX) file in the project (TEST.PJX) file.

  4. Open the project as a database by issuing the commands USE TEST.PJX and BROWSE.

  5. Look for a File Name (CUSTOMER.SPR): NAME FIELD of TEST.PJX. Determine the record number of the (CUSTOMER.SPR) field. It should be the next record after CUSTOMER.SCX.

  6. Type

          DO GENSCRN WITH "P_NAME",3
    

    where "P_NAME" is the location in the project file (P_NAME="C:\Fox2\Test.Pjx") and 3 is the record number of the .SPR file (CUSTOMER.SPR).

    NOTE: If the filename or path is not valid, miscellaneous error messages related to GENSCRN will occur. To remove these error messages, issue a CLEAR command and start over with step 6.


Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a
KBCategory: kbprg
KBSubcategory: FxtoolSbuilder


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