Microsoft KB Archive/198556

= PRB: Converted Form Has Large Page Frame =

Article ID: 198556

Article Last Modified on 5/10/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition
 * Microsoft Visual FoxPro 3.0b for Macintosh

-



This article was previously published under Q198556



SYMPTOMS
After doing a Functional Conversion of a screen from FoxPro 2.x to Visual FoxPro, a page frame is placed on the form whose Height and Width properties are set to 30,000 pixels. The properties of the page frame are read-only.



CAUSE
These dimensions are hard coded into the Convert.app file.



RESOLUTION
There are at least three resolutions for this if these dimensions are a problem. Before attempting any of these resolutions, please backup your files.

First Resolution
After the screen has been Functionally Converted, open the form file (.scx) as a table and look in the Class column until the page frame is found. This will probably be record 5 in the .scx file. For the page frame record, open the Properties memo field and change the Height and Width to the desired values.

Second Resolution
Modify the Convert.app file. The source code for the Convert.app file is located in the ..\VFP\Tools\Convert folder.

 Open the Convert.pjx and click the Code tab. Under Programs, open the convert file. This is the main program file for the Convert.app.  Search for M_HEIGHT until you find the following two lines of code: THIS.AddProp(M_HEIGHT,30000) THIS.AddProp(M_WIDTH,30000)  Change the 30000 to the desired value then save and close the file. Rebuild the Convert.app from the Project Manager. Copy the new Convert.app to the ..\VFP folder. Be sure to verify that the_converter system memory variable points to the correct file. From the Tools meun, choose Options. In the Options dialog box click the File Locations tab and then select the command button to the right of the Converter text box.</li></ol>

Third Resolution
Use the Visual FoxPro Transformer application. This could be the best solution since other aspects of converted forms can be changed with the Transformer and many forms at one time. The Transfrm.app file is located in the ..\VFP\Tools\Transfrm folder. This application was not available until Visual FoxPro 5.0 on the Windows platform.

NOTE: The Visual FoxPro Help file states the following:

The Transformer is not supported by Microsoft Support Services either electronically or via telephone.

To learn more about the Transformer, go to the Transformer topic in Visual FoxPro Help. "Help Transformer", without quotes, typed in the Command window should bring it up.

To use the Transformer to resolve the problem described in this article, use the following steps after performing a Functional conversion on the form(s):

<ol>  Run the Transfrm.app file. It may be easier to copy it to the Visual FoxPro directory first and then use the following command: DO HOME+"transfrm.app" </li> In the Files tab, add your .scx file or the directory that contains the .scx files that you need to transform.</li>  In the Rules tab, fill in the following: <pre class="fixed_text">     Property: height Value:   640           && Or whatever value is desired. Files:   *.scx Classes: pageframe </li> Choose the Add button to add this rule. Do the same for the Width property.</li> To save these rules for use at a later time, choose the save button and supply a table name.</li> In the Log tab, clear the Create Log Only check box and then select the Transform button.</li></ol>

<div class="status_section">

STATUS
This behavior is by design.

<div class="moreinformation_section">

MORE INFORMATION
The page frame is so large when converted to allow you to place controls outside of the visible portion of the form for special behaviors. Not every developer is going to do this. However, if one does, the page frame is large enough to contain the controls. Since this page frame is invisible when you run the form, this should not effect the functionality of existing screens converted to Visual FoxPro.

Steps to Reproduce Behavior

 * 1) Create a form in FoxPro 2.x.
 * 2) Open this form in Visual FoxPro.
 * 3) When prompted, choose Functional Conversion.
 * 4) Examine the Height and Width properties of the page frame on the converted form.

<div class="references_section">