|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
Menu Changes in Visual Basic .NET
In Visual Basic 6.0, menus were created using the Menu Editor. Menus could not be created programmatically, but could be changed or added to programmatically.
In Visual Basic .NET, menus are created using MainMenu controls, which provide a graphical menu designer. Menus can also be created programmatically. For more information, see Menus in Windows Forms.
In Visual Basic 6.0, context menus were created by calling the PopupMenu method of a form or control. They could not be created programmatically; the PopupMenu method required that a menu already existed.
In Visual Basic .NET, context menus are created using ContextMenu controls; they can also be created programmatically. For more information, see Context Menus on Windows Forms.
In Visual Basic 6.0, the NegotiateMenus property of a form determined whether a menu from an object on the form would be merged with the form's menu. This property could only be set at design time.
In Visual Basic .NET, menus can be merged using the MergeMenu method of a MainMenu or ContextMenu control. For more information, see Merging Menu Items Programmatically.