Microsoft KB Archive/148357

= FIX: Class Designer Changes the Width of a Form Class =

Article ID: 148357

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition

-



This article was previously published under Q148357



SYMPTOMS
In Visual FoxPro, Microsoft recommends that forms and classes be designed using the Foxels measurement instead of the Pixels measurement when an application is intended to be used across platforms or when the font metrics are likely to change (small to large, for example).

However, if a Form class is created using the Class Designer with the scalemode set to Foxel and width set to a specific number, the width of the form may be reduced or enlarged depending on the font used. For example, it is reduced by twenty five percent (25%) after the class has been changed to Courier New from Arial, saved, and modified again. This is demonstrated in the following article in the Microsoft Knowledge Base:

129208 Pixel Replaces Foxel as Default Scale Value in Design Mode



WORKAROUND
To prevents this from happening, change the Scalemode property to Pixels or don't change the Fontname property from Arial.



STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been fixed in Visual FoxPro 5.0 for Windows.



Steps to Reproduce Problem
 Using the Visual FoxPro class designer, create a new class based on Form.  Set the properties of the form as follows: FontName = "Courier New" ScaleMode = "Foxels" Width = 100  Save the class in a class Library. Modify the class.

Note that the width is now 75 instead of the initial setting of 100. Each subsequent save or modification results in 25% reduction in the width.

Keywords: kbbug kbfix kbvfp500fix KB148357

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.