Explanation of the Control Box Menu

Last reviewed: June 21, 1995
Article ID: Q94936
The information in this article applies to:

- Standard and Professional Editions of Microsoft Visual Basic for

  Windows, versions 2.0 and 3.0
- Microsoft Visual Basic programming system for Windows, version 1.0 - The Standard and Professional Editions of Microsoft Visual Basic
  for MS-DOS, version 1.0

SUMMARY

This article describes how to cause the control box menu to drop down and retract as well as how to use the Microsoft Windows versions 3.0 and 3.1 Size and Move options with Visual Basic for MS-DOS.

In Windows, the control box in the upper left corner of a window has a drop-down menu that appears when you click the control box. The drop-down menu contains items such as Move, Size, Minimize, and Maximize. Depending on the position of the mouse, when you hold down the mouse button, the drop-down menu either remains down or retracts to its original position.

MORE INFORMATION

If you click a window's control box, the menu remains down. To create the same effect in Visual Basic for Windows, press ALT+SPACE on the keyboard. In Visual Basic for MS-DOS, press ALT+- (the ALT and minus keys).

If you simply depress the mouse button over the control box instead of clicking the control box, the resulting behavior depends on where you release the mouse button:

  • If the button is released over a grayed item, the menu remains dropped to indicate that the selection is not currently active.
  • If the button is released outside of the menu or control box, the menu is dismissed and no action is taken
  • If the button is released over an enabled menu item, then the menu is dismissed and the appropriate action is invoked.

The purpose of the Size and Move menu commands located in the control box on a window (form) can be confusing. They provide a way to move or size a window by using the keyboard. When you click the control box and choose either Move or Size, the outline of the window is displayed to indicate that you can now move or size the window by using the arrow keys on the keyboard. You must use the arrow keys; if you try to drag the outline with the mouse, you will cancel out the Move or Size operation and resume normal mouse operations. Once you have sized or moved the window to the correct position while it still has an outline, you can lock the window into its new position by pressing the ENTER key.


Additional reference words: B_VBmsdos
KBCategory: kbprg
KBSubcategory: PrgCtrlsStd


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: June 21, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.