Managing File Sizes When Transporting Between Platforms

Last reviewed: August 28, 1995
Article ID: Q120135
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, 2.6, 2.6a
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a, 2.5b, 2.6, 2.6a
  • Microsoft FoxPro for Macintosh, version 2.5b, 2.5c, 2.6a

SUMMARY

When transporting objects such as screens between platforms such as from Windows to MS-DOS, the transporter will create additional objects (buttons, list boxes, and so on) that are platform-specific. The transported object will have information relevant to both platforms which will result in larger run-time files unless specific steps are taken to generate code for the specific platform the object was transported to.

MORE INFORMATION

When transporting an object from one platform to another, the transporter appends additional records to a screen SCX file. These additional records contain the platform-specific information necessary to run the object on the new platform. By default, when the transported screen is re-generated on the new platform, FoxPro creates an SPR with both the new platform and the old platform code. Consequently, the resulting SPR can be up to twice as large as it needs to be.

To remedy this problem, you must select the "xxx Objects only" (where "xxx" represents MS-DOS, WINDOWS, or MAC) box to generate code for the appropriate platform.

For example, in one test, we transported a screen created under FoxPro version 2.6 for Windows to FoxPro version 2.6 for MS-DOS. The screen was originally 14K in size. After transporting, the SCX file increased to 24K in size, due to the additional records added for the MS-DOS platform. When we regenerated the code without checking the "MS-DOS objects only" box, the resulting SPR code was 27K in size. But when we regenerated the code after selecting the "MS-DOS objects only" check box, the SPR code decreased to 16K in size, a net loss of 11K. This was because only code for the MS-DOS FoxPro environment was generated.

NOTE: if the screens are not a part of a project, then the "xxx objects only" box will have to be selected each and every time the screen is regenerated. Foxpro will use the default generator options. If, however, the screen is part of a project, it will only be necessary to set this option once. After that the setting for this option will be respected and only the platform-specific objects will be generated.

To permanently decrease the size of the SCX file for a given screen, you need to run the USE command (for example, USE CUSTOMER.SCX). Then run the DELETE FOR PLATFORM = <Platform type> cammand and use the PACK comment to pack the SCX. This is an alternate solution that keeps the SPR code from growing in size. Valid entries for the <Platform type> are MS-DOS, WINDOWS, MAC, and UNIX. All other platform values should be left alone.


Additional reference words: FoxMac FoxDos FoxWin 2.00 2.50 2.50a 2.50b
2.50c 2.60 2.60a Transport spr size
KBCategory: kbenv kbtshoot
KBSubcategory: FxenvGeneral


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: August 28, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.