Share via


Events Interface

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

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

Syntax

'Declaration
<GuidAttribute("134170F8-93B1-42DD-9F89-A2AC7010BA07")> _
Public Interface Events
[GuidAttribute("134170F8-93B1-42DD-9F89-A2AC7010BA07")]
public interface Events
[GuidAttribute(L"134170F8-93B1-42DD-9F89-A2AC7010BA07")]
public interface class Events
[<GuidAttribute("134170F8-93B1-42DD-9F89-A2AC7010BA07")>]
type Events =  interface end
public interface Events

The Events type exposes the following members.

Properties

  Name Description
Public property BuildEvents Gets the BuildEvents object, which provides events for solution builds.
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 DocumentEvents Gets the DocumentEvents that provides events for the document.
Public property DTEEvents Gets the DTEEvents 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 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 TextEditorEvents Gets the TextEditorEvents object for the IDE.
Public property WindowEvents Gets the WindowEvents object that provides events for windows in the development environment.

Top

Methods

  Name Description
Public method GetObject Gets 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 to the Events object that are specific to them. 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

EnvDTE Namespace