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 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。