DOC: Incorrect Examples on Pages 69-75 of Developer's Guide (136070)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
This article was previously published under Q136070 SUMMARY
The example that create a VCR control in the Visual FoxPro "Developer's
Guide" on pages 69-75 creates a subclass of the VCR control. When an
instance of VCR2 is created on a form, the container is not sized
correctly; it is much wider than the form.
The following conditions lead to this problem:
- The ScaleMode of the form is in foxels.
- The width of the VCR2 container, expressed in foxels, is decimal.
- The width of the VCR2 container is used as a variable in the body of the class definition (in the DEFINE part). In this example, the specific
lines are:
Left=This.Width+.2
Width=This.Width+This.CmdQuit.Width+.2
If all these conditions are true, then when an instance of the class is
created, Visual FoxPro sees that the width of the container is in foxels.
It converts the number to pixels, using the font of the form as the basis
for conversion. That number is in turn used to size the container on the
form, but it is not converted back to foxels. In this example, the Width of
the container is converted from 6.2 foxels to 61 pixels. When the container
is placed on the form, the same measure is used. However, the unit is no
longer pixels, it is foxels. So the width of the container is 61 foxels.
Fix Status
This documentation error has been fixed in Visual FoxPro 5.0 for Windows.
REFERENCES
For more information about foxels and pixels, please see the following
articles in the Microsoft Knowledge Base:
106161
How to Convert Screen Object Positions Between Platforms
129208
Pixel Replaces Foxel as Default Scale Value in Design Mode
Modification Type: | Major | Last Reviewed: | 9/30/2003 |
---|
Keywords: | kbdocfix KB136070 |
---|
|