Form with a Menu Is Not Sizable During Run Time (143312)



The information in this article applies to:

  • Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0
  • Microsoft Visual Basic Professional Edition, 16-bit, for Windows 4.0
  • Microsoft Visual Basic Professional Edition, 32-bit, for Windows 4.0
  • Microsoft Visual Basic Enterprise Edition, 16-bit, for Windows 4.0
  • Microsoft Visual Basic Enterprise Edition, 32-bit, for Windows 4.0

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.

Modification Type:MajorLast Reviewed:12/9/2003
Keywords:KB143312