Microsoft KB Archive/143312

= Form with a Menu Is Not Sizable During Run Time =

Article ID: 143312

Article Last Modified on 12/9/2003

-

APPLIES TO


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

-



This article was previously published under Q143312



SUMMARY
A form in a 16-bit or 32-bit Visual Basic application with the BorderStyle property set to "5 - Sizable ToolWindow" and that includes a hidden or visible menu is not sizable during run time.

If a status bar is added to this same form in 32-bit Visual Basic, then it (the status bar) can be re-sized; however, the form still cannot be resized.

This behavior is by design and controlled by the operating system.



MORE INFORMATION
The expected result of setting the border style (5 - Sizable ToolWindow) of a form is that the form should always be sizable or that this border style should not be available as a selection if a menu is added to the form. Documentation of this border style does not explain this behavior when a menu item is present.

Steps to Re-create

 * 1) Start Visual Basic for 32 bit.
 * 2) Set the Form1 BorderStyle property to 5 (Sizable ToolWindow).
 * 3) Add a menu to the form.
 * 4) Press the F5 key to run the Program. Notice that the form isn't sizable.
 * 5) End the program and add a StatusBar control to the form.
 * 6) Press the F5 key again to run the program. Note that the form is noticeable, but the status bar has a size handle at the bottom right which allows it to be re-sized.

Additional query words: 4.00 vb4win vb4all

Keywords: KB143312

-

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

© Microsoft Corporation. All rights reserved.