How To Create Multi-Column Menus in Visual Basic Using the WIN32 API (216185)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q216185 SUMMARY
Multi-column menus can be useful when you don't want to cover up sections of your form or when handling large menus that would otherwise extend beyond the screen. Visual Basic offers no built-in method for creating multi-column menus. However, you can split a menu into multiple columns by using a few API calls. The following sample demonstrates how to do this both at Form Load and dynamically, from a CommandButton.
NOTE: This technique will only work for menus that are visible on the menu bar. It does not work for invisible menus, such as shortcut or pop-up menus.
REFERENCES
For additional information about manipulating menus in Visual Basic, please see the following article in the Microsoft Knowledge Base:
216189 How To Right Justify the Help Menu Item in Visual Basic
(c) Microsoft Corporation 1999, All Rights Reserved. Contributions by Chris E. Jolley, Microsoft Corporation.
Modification Type: | Minor | Last Reviewed: | 7/15/2004 |
---|
Keywords: | kbAPI kbCodeSnippet kbhowto kbMenu KB216185 |
---|
|