VCProjectEngine.Events 属性

返回对象,该对象是项目引擎激发的事件的源。

命名空间:  Microsoft.VisualStudio.VCProjectEngine
程序集:  Microsoft.VisualStudio.VCProjectEngine(在 Microsoft.VisualStudio.VCProjectEngine.dll 中)

语法

声明
ReadOnly Property Events As Object
Object Events { get; }
property Object^ Events {
    Object^ get ();
}
abstract Events : Object with get
function get Events () : Object

属性值

类型:System.Object
作为事件源的对象。

备注

请参见 VCProjectEngineEvents 对象有关更多信息。

示例

' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
    Sub HookVCEvent()
        Dim projEngine As New VCProjectEngineObject
        Dim prj As VCProject
        Dim evt As VCProjectEngineEvents
        ' if there is a VC Project Load in the solution 
        prj = DTE.Solution.Projects.Item(1).Object
        projEngine = prj.VCProjectEngine()
        evt = projEngine.Events
        AddHandler evt.ProjectBuildStarted, AddressOf VCBuildStartedEvent

    End Sub
    Sub VCBuildStartedEvent(ByVal Cfg As Object)
        MsgBox("VC Build Started")
    End Sub
End Module

.NET Framework 安全性

请参见

参考

VCProjectEngine 接口

Microsoft.VisualStudio.VCProjectEngine 命名空间