Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

CommandBarEvents Object

Visual Studio .NET 2003

Causes a Click Event to occur when a control on the command bar is clicked.

DTE

   Events

      CommandBarEvents

[Visual Basic .NET]
Public Class CommandBarEvents
[Visual Basic 6]
Class CommandBarEvents
[C++]
class CommandBarEvents
[C#]
public class CommandBarEvents
[JScript .NET]
public class CommandBarEvents

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 using the WithEvents object declaration.

Requirements

Namespace: EnvDTE

File: dte.olb

Example

<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

Properties, Methods, and Events | CommandBarEvents Property

Show:
© 2015 Microsoft