共用方式為


CommandBarsClass.Add Method

Adds a command bar.

Namespace:  Microsoft.VisualStudio.CommandBars
Assembly:  Microsoft.VisualStudio.CommandBars (in Microsoft.VisualStudio.CommandBars.dll)

Syntax

'宣告
Public Overridable Function Add ( _
    Name As Object, _
    Position As Object, _
    MenuBar As Object, _
    Temporary As Object _
) As CommandBar
public virtual CommandBar Add(
    Object Name,
    Object Position,
    Object MenuBar,
    Object Temporary
)

Parameters

  • MenuBar
    Type: System.Object
    true if the command bar is a menu bar, otherwise false.
  • Temporary
    Type: System.Object
    true if the bar is temporary, otherwise false.

Return Value

Type: Microsoft.VisualStudio.CommandBars.CommandBar
The newly-added CommandBar.

Implements

_CommandBars.Add(Object, Object, Object, Object)

.NET Framework Security

See Also

Reference

CommandBarsClass Class

Microsoft.VisualStudio.CommandBars Namespace