Microsoft KB Archive/145619

= FIX: Maximized Win95 MDI Child Form Disappears =

Article ID: 145619

Article Last Modified on 11/18/2003

-

APPLIES TO


 * Microsoft Visual Basic 4.0 Standard Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 32-Bit Enterprise Edition

-



This article was previously published under Q145619



SYMPTOMS
Under certain circumstances, a maximized MDI child form is invisible and cannot be made visible. The problem occurs under Windows 95, Windows NT 4.0, and Windows 2000 when using the 32-bit version of Visual Basic 4.0.



RESOLUTION
When the MaxButton property of Form1 is set to True, the problem does not occur.



STATUS
Microsoft has confirmed this to be an issue in Microsoft Windows 95, Windows NT 4.0, and Windows 2000. This problem has been fixed in Microsoft Windows 98.



Steps to Reproduce Behavior
 Start Visual Basic 4.0, 32-bit. If it is already running, click New Project on the File menu. Use the Insert/MDI Form menu option to add an MDIForm to the project. In the Design Environment Property window, set the following properties for Form1:

MinButton = False

MaxButton = False

ControlBox = False

MDIChild = True

WindowState = 2 - Maximized

Caption =

Borderstyle = 0 - None 'Options 1 - 5 will also work.

 Run the application. Form1 will not be visible.

Workaround
 Start Visual Basic 4.0, 32-bit. If it is already running, click New Project on the File menu.</li> Use the Insert/MDI Form menu option to add an MDIForm to the project.</li> In the Design Environment Property window, set the following properties for Form1:

MinButton = False MaxButton = False ControlBox = False MDIChild = True WindowState = 0 - Normal Caption = Borderstyle = 0 - None 'Options 1 - 5 will also work.

</li>  In the General Declaration section of Form1, paste the following: Private Sub Form_Load 'You could copy the following 4 lines to the Resize 'event of MDIForm1 as well for best results. Form1.Top = 0 Form1.Left = 0 Form1.Width = MDIForm1.Width - 185 Form1.Height = MDIForm1.Height - 470 End Sub </li> Run the application. Form1 will be visible.</li></ol>

Keywords: kbbug kbfix kboswin98fix KB145619

-

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

© Microsoft Corporation. All rights reserved.