Form with a Menu Is Not Sizable During Run Time

ID: Q143312


The information in this article applies to:
  • Microsoft Visual Basic Standard, Professional, and Enterprise Editions, 16-bit and 32-bit, for Windows, version 4.0


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 : PrgCtrlsCus EnvtRun
Version : WINDOWS:4.0
Platform : WINDOWS
Issue type :


Last Reviewed: January 21, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.