共用方式為


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

屬性值

類型: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 命名空間