Visual Basic (Declaration) | |
---|---|
Public Overridable Sub AddCommand( _ ByVal command As MenuCommand _ ) |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As MenuCommandServiceBase Dim command As MenuCommand instance.AddCommand(command) |
C# | |
---|---|
public virtual void AddCommand( MenuCommand command ) |
C++/CLI | |
---|---|
public: virtual void AddCommand( MenuCommand^ command ) |
Parameters
- command
- The System.ComponentModel.Design.MenuCommand to add.
Exception | Description |
---|---|
System.InvalidOperationException | The System.ComponentModel.Design.CommandID of the specified System.ComponentModel.Design.MenuCommand is already present on a menu. |
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2