Compartilhar via


Events2 Interface

Allows access to all events in the extensibility model. Events may also be exposed from specific objects within the extensibility model.

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

Syntax

'Declaration
<GuidAttribute("BED31E8C-F845-4397-AF13-6B82A6996C0D")> _
Public Interface Events2 _
    Inherits Events
[GuidAttribute("BED31E8C-F845-4397-AF13-6B82A6996C0D")]
public interface Events2 : Events
[GuidAttribute(L"BED31E8C-F845-4397-AF13-6B82A6996C0D")]
public interface class Events2 : Events
[<GuidAttribute("BED31E8C-F845-4397-AF13-6B82A6996C0D")>]
type Events2 =  
    interface 
        interface Events 
    end
public interface Events2 extends Events

The Events2 type exposes the following members.

Properties

  Name Description
Public property BuildEvents Gets the BuildEvents object, which provides events for solution builds.
Public property CodeModelEvents Gets the CodeModelEvents object which provides events for the code model.
Public property CommandBarEvents Gets an object providing events fired when the supplied CommandBarControl object is clicked.
Public property CommandEvents Gets the CommandEvents for the specified command.
Public property DebuggerEvents Gets the object that provides events from the debugger.
Public property DebuggerExpressionEvaluationEvents Gets an event object which can be used to be notified when the debugger starts or stops an expression evaluation.
Public property DebuggerProcessEvents Retrieves an event object which can be used to notify when a debugged process runs or stops.
Public property DocumentEvents Gets the DocumentEvents that provides events for the document.
Public property DTEEvents Gets the DTEEvents object that provides events for the development environment.
Public property FindEvents Gets the FindEvents for the Find operation.
Public property MiscFilesEvents Gets the ProjectItemsEvents for the solution.
Public property OutputWindowEvents Gets the OutputWindowEvents for the window events.
Public property ProjectItemsEvents Gets an event object which can be used to find events for all project items within the solution.
Public property ProjectsEvents Gets an event object which can be used to find events for all projects wihin the solution.
Public property PublishEvents Gets an object to comment to publishing events.
Public property SelectionEvents Gets the SelectionEvents for the selection.
Public property SolutionEvents Gets the SolutionEvents object for the solution.
Public property SolutionItemsEvents Gets the ProjectItemsEvents object for the solution.
Public property TaskListEvents Gets the TaskListEvents for the development environment.
Public property TextDocumentKeyPressEvents Gets an event object which can be used to find key press events within a text editor.
Public property TextEditorEvents Gets the TextEditorEvents object for the IDE.
Public property WindowEvents Gets the WindowEvents object that provides events for windows in the development environment.
Public property WindowVisibilityEvents Gets an event object which can be used to be notified when a tool window is showing or hiding.

Top

Methods

  Name Description
Public method GetObject Returns an interface or object that is late-bound to the DTE object and can be accessed by name at run time.

Top

Remarks

The automation model contains a root Events object from which automation clients written in any language can reference automation events, such as the SolutionEvents.

Various IDE tools, project types, editors, and so forth may add additional events, which are specific to them, to the Events object. For example, Visual C++ adds the VCProjectItemsEvents property.

Examples

Public Module Module1
   Dim WithEvents bldevents As BuildEvents
   Dim applicationObject As EnvDTE.DTE

   Sub EventsExample()
      Dim addInInstance As EnvDTE.AddIn

      applicationObject = CType(Application, EnvDTE.DTE)
      bldevents = CType(applicationObject.Events.BuildEvents, EnvDTE.BuildEvents)
   End Sub

   Private Sub bldevents_OnBuildDone(ByVal Scope As EnvDTE.vsBuildScope, ByVal Action As EnvDTE.vsBuildAction) Handles bldevents.OnBuildDone
      MsgBox("Build complete")
   End Sub
End Module

See Also

Reference

EnvDTE80 Namespace