Udostępnij za pośrednictwem


CommandBarEvents Interface

Causes a Click event to occur when a control on the command bar is clicked. Use this object for functionality, and refer to CommandBarEventsClass for this object's documentation.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Syntax

'Declaration
<GuidAttribute("9E66FE98-A1C6-421D-8C0C-6DA4E652E770")> _
Public Interface CommandBarEvents _
    Inherits _CommandBarControlEvents, _dispCommandBarControlEvents_Event
[GuidAttribute("9E66FE98-A1C6-421D-8C0C-6DA4E652E770")]
public interface CommandBarEvents : _CommandBarControlEvents, 
    _dispCommandBarControlEvents_Event
[GuidAttribute(L"9E66FE98-A1C6-421D-8C0C-6DA4E652E770")]
public interface class CommandBarEvents : _CommandBarControlEvents, 
    _dispCommandBarControlEvents_Event
[<GuidAttribute("9E66FE98-A1C6-421D-8C0C-6DA4E652E770")>]
type CommandBarEvents =  
    interface
        interface _CommandBarControlEvents
        interface _dispCommandBarControlEvents_Event
    end
public interface CommandBarEvents extends _CommandBarControlEvents, _dispCommandBarControlEvents_Event

The CommandBarEvents type exposes the following members.

Methods

  Name Description
Public method add_Click Infrastructure. Microsoft Internal Use Only. (Inherited from _dispCommandBarControlEvents_Event.)
Public method remove_Click Infrastructure. Microsoft Internal Use Only. (Inherited from _dispCommandBarControlEvents_Event.)

Top

Events

  Name Description
Public event Click Infrastructure. Microsoft Internal Use Only. (Inherited from _dispCommandBarControlEvents_Event.)

Top

Remarks

The CommandBarEvents object is returned by the CommandBarEvents property of the Events object. The object that is returned has one event in its interface, the Click event. In Visual Basic, you can handle this event by using the WithEvents object declaration.

Examples

<System.ContextStaticAttribute()> Public WithEvents CommandBarEvents As EnvDTE.CommandBarEvents

Public Sub CommandBarEvents_Click(ByVal CommandBarControl As Object, ByRef handled As Boolean, ByRef CancelDefault As Boolean) Handles CommandBarEvents.Click
   MsgBox("test")
End Sub

See Also

Reference

EnvDTE Namespace