The information in this article applies to:
SYMPTOMSThe Top, Left, ScaleHeight, and ScaleWidth properties of a maximized Visual Basic for Windows form may return incorrect values. When a form is maximized, the values returned by these properties should be close to the resolution of your monitor. The only difference between the property values returned and the resolution should be due to BorderStyles, menus, or title bars, and should in no case be greater than the resolution of your monitor. CAUSEIn some cases, with a maximized form, the returned property values can be greater than the screen resolution. This is because of a problem in the Windows API routine, GetClientRect(), which Visual Basic calls to get the form properties. This is a problem with Microsoft Windows versions 3.0 and 3.1, not with Visual Basic. STATUSMicrosoft has confirmed this to be a bug in Microsoft Windows versions 3.0 and 3.1. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATIONThe Left property determines the distance between the internal left edge of an object and the left edge of its container. The Top property determines the distance between the internal top edge of an object and the top edge of its container. ScaleHeight sets or returns the range of the vertical axis for an object's internal coordinate system, and ScaleWidth sets or returns the horizontal axis. On a form, the coordinate system includes the form's internal area, not including borders and title bar. Steps to Reproduce ProblemTo duplicate the problem, experiment with various BorderStyles, set ScaleMode to pixels, and add the following code:
Run the application and click the form. Note the values printed. With no
border, the values should correspond to the resolution of your monitor,
and should change slightly for each BorderStyle from the addition of
borders, menus, and title bars.Here's another example. This occurs when you use the following code in a maximized form with a ScaleMode of 1 (twips) in a 800-by-600 (pixel) screen resolution:
The following is the results:
Additional query words: buglist3.00 buglist3.10 2.00 3.00 3.10
Keywords : |
Last Reviewed: August 19, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |