BUG: _SCREEN.Height/Width May Increase When BorderStyle Is Set (189720)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q189720 SYMPTOMS
The values of SCREEN.Height or _SCREEN.Width may increase after setting the
value of _SCREEN.BorderStyle.
RESOLUTION
As a workaround, you can store the current values for _SCREEN.Height and
_SCREEN.Width, set the value for _SCREEN.BorderStyle, then reset
_SCREEN.Height and _SCREEN.Width back to the stored values.
For example, run the following code from a program (.prg) file:
LOCAL lnOriginalHeight, lnOriginalWidth
PUBLIC ox
CLEAR
SET STATUS BAR ON
ox=CREATEOBJECT('toolbar')
ox.Width = 35
ox.Dock(1)
ox.Show()
lnOriginalHeight = _SCREEN.Height
lnOriginalWidth = _SCREEN.Width
_SCREEN.BorderStyle = 3
* Next 2 lines are workaround
_SCREEN.Height= lnOriginalHeight
_SCREEN.Width = lnOriginalWidth
* End of workaround code
?'Change in Height =', _SCREEN.Height - lnOriginalHeight
?'Change in Width =', _SCREEN.Width - lnOriginalWidth
The height and width are changed, but they are reset to their original
values.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbbug kbnofix KB189720 kbAudDeveloper |
---|
|