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
'Usage
Dim instance As Events2
[GuidAttribute("BED31E8C-F845-4397-AF13-6B82A6996C0D")]
public interface Events2 : Events
[GuidAttribute(L"BED31E8C-F845-4397-AF13-6B82A6996C0D")]
public interface class Events2 : Events
public interface Events2 extends Events

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

Events2 Members

EnvDTE80 Namespace