Microsoft KB Archive/94936

= Explanation of the Control Box Menu =

Article ID: 94936

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 1.0 Standard Edition
 * Microsoft Visual Basic for MS-DOS

-



This article was previously published under Q94936



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 query words: B_VBmsdos

Keywords: KB94936

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.