BUG: Setting WindowState = 0 Doesn't Set Window State to NormalLast reviewed: February 5, 1998Article ID: Q180527 |
The information in this article applies to:
SYMPTOMSSetting the WindowState property of a form to '0 - Normal' has no affect.
RESOLUTIONSave the form's height and width before changing the WindowState property (such as Maximizing), then restore the height and width when desired as follows:
Option Explicit Dim FormHeight Dim FormWidth Private Sub Form_Load() 'initialize form size, could be set at design-time also. Form1.height = 2000 Form1.width = 3000 'Save the form's height and width. FormHeight = Form1.Height FormWidth = Form1.Width Command1.Caption = "Maximized" Command2.Caption = "Normal" End Sub Private Sub Command1_Click() Form1.WindowState = 2 'Maximized End Sub Private Sub Command2_Click() 'Restore the form's original height and width. Form1.Height = FormHeight Form1.Width = FormWidth End Sub STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce Behavior
Keywords : vb5all vbce Version : WINDOWS:1.0 Platform : WINDOWS Issue type : kbbug Solution Type : kbpending |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |