FIX: ControlBox Property False Disables Focus w/ Keys in Menus

Last reviewed: October 30, 1997
Article ID: Q76556
1.00 WINDOWS kbenv kbbuglist

The information in this article applies to:

- Microsoft Visual Basic programming system for Windows, version 1.0

SYMPTOMS

When the ControlBox property on a form is set to False, (disabling the Control Box), the ability to change focus within menus using the keyboard (such as by using the ARROW keys) is lost. This is because of a limitation of Windows; it is not a problem with Visual Basic.

STATUS

Microsoft has confirmed this to be a problem with Windows version 3.0. This problem was corrected in Microsoft Visual Basic version 3.0 for Windows.

This problem only applies to changing focus between menu items. The ARROW keys work correctly to change focus with other controls (for example, two command buttons), even with the ControlBox disabled.

MORE INFORMATION

Steps to Reproduce Problem

  1. Start Visual Basic.

  2. From the Window menu, choose Menu Design Window.

  3. Enter Test1 and Test2 as the caption and CtlName of two separate top level menu items. Choose the Done button to close the Menu Design window.

  4. From the Properties box, select ControlBox.

  5. From the Settings box, set the ControlBox property to False. (This removes the ControlBox from the form at run time.)

  6. Press F5 to run the application.

Notice that the mouse can be used to select either the Test1 or Test2 menu, but pressing the ALT key followed by the LEFT or RIGHT ARROW keys will not allow you to move between the menus. You will only be able to select the Test1 menu by pressing the ALT key.

Setting the ControlBox property to True will re-enable the LEFT/RIGHT ARROW keys to select menu items.


Additional reference words: fixlist2.00 fixlist3.00 1.00 2.00 3.00
KBCategory: kbenv kbbuglist
KBSubcategory: EnvtDes
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.