Transported Screen Does Not Update Generated Code

ID: Q99760

The information in this article applies to:

SUMMARY

A screen (.SCX) file that has been transported from FoxPro Version 2.x for MS-DOS to FoxPro version 2.5 for Windows will generate both Windows code and MS-DOS code when you choose Generate from the Program menu unless you choose the More button in the Generate Screen dialog box and under Generated Code Options, select the Windows Objects Only check box.

MORE INFORMATION

Any changes made in the transported .SCX file will result in corresponding changes to the Windows code portion of the generated .SPR file. However, the MS-DOS code portion of the file will not reflect any changes made to the Windows .SCX file. The same MS-DOS code will always be generated in the .SPR file regardless of changes made in the .SCX file. To suppress the MS-DOS code, choose the More button in the Generate Screen dialog box and under Generated Code Options, select the Windows Objects Only check box.

The only way to update the MS-DOS portion of the code is to transport the Windows .SCX file back to the MS-DOS .SCX file (FoxPro version 2.5 for MS-DOS), make the desired changes, and then transport that file back to the Windows version again. The logical environment variables _WINDOWS and _DOS determine whether the Windows code or the MS-DOS code is executed.

Steps to Reproduce Problem

1. Create any .SCX file in FoxPro version 2.5 for MS-DOS.

2. Transport the file to FoxPro for Windows.

3. From the Program menu, choose Generate.

     Note: The generated screen will contain code for both the MS-DOS
     version and the Windows version. The proper code is executed
     based on the value of the _WINDOWS and _DOS logical environment
     variables.

4. Reopen the .SCX file in Windows. Make any desired changes to the
   screen.

5. Regenerate the program.

   The Windows portion of the code has been updated to reflect changes
   made in the .SCX file, but the MS-DOS portion of the code remains
   untouched.

Additional reference words: FoxDos FoxWin 2.50 2.50a KBCategory: kbprg KBSubcategory: FxprgGeneral

Last Reviewed: June 27, 1995