Menu with No Caption Bar/Buttons/Control Box Not Supported

ID Number: Q76553

1.00

WINDOWS

buglist3.00 buglist3.10

Summary:

The addition of a menu to a form with no caption, no maximize/minimize

buttons, and no control-menu box is not supported in Visual Basic under

Windows version 3.0 or 3.1.

This has been confirmed to be a limitation in Microsoft Visual Basic

version 1.0 because of a problem with the menu driver in Microsoft

Windows versions 3.0 and 3.1.

More Information:

If you place a menu on a form with no caption bar or associated

buttons, the result is a menu bar that does not refresh properly.

Steps to Reproduce Problem

--------------------------

1. Run Visual Basic, or from the File menu, choose New Project (ALT,

F, N) if Visual Basic is already running. Form1 is created by

default.

2. Delete the contents of the Caption property.

3. Set the ControlBox, Max, and Min properties to False.

4. Using the Menu Design window, create a single menu item with the

caption "Test" and control name "Test".

5. Press F5 to run the application.

Note how the menu bar was not properly repainted, causing the image

immediately behind the form to be visible through the menu bar.

If you place any other form over the menu bar and then remove it, the

portion that was covering the menu bar area remains.

This problem occurs because the Microsoft Windows menu driver does not

paint the menus correctly.

For this reason, this particular form configuration is not supported

by Visual Basic at this time, even though you are able to create the

configuration in the editing environment.

For more information about a related problem with the menu bar and the

Fixed Double border style, query on the following words in the

Microsoft Knowledge Base:

Visual and Basic and menu and fixed and double and border

Additional reference words: 1.00 3.00 3.10