Microsoft KB Archive/96290

{| = Generating Screen Code by Directly Calling GENSCRN.PRG =
 * width="100%"|

ID: Q96290

2.50 2.50a | 2.00 2.50 2.50a

WINDOWS   | MS-DOS kbprg 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 .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 &quot;P_NAME&quot;,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 &quot;P_NAME&quot;,3

where &quot;P_NAME&quot; is the location in the project file (P_NAME=&quot;C:\Fox2\Test.Pjx&quot;) 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 Keywords         : FxtoolSbuilder Version          : 2.50 2.50a | 2.00 2.50 2.50a Platform         : MS-DOS WINDOWS
 * }