更新 : 2007 年 11 月
VSWebSite オブジェクトのイベントを表します。WebSiteMiscEventsClass で提供される機能にアクセスするには、このクラスを使用します。
名前空間 : VsWebSite
アセンブリ : VsWebSite.Interop (VsWebSite.Interop.dll 内)
構文
'宣言
<GuidAttribute("9D9D4002-3258-4EBB-BF58-AF62C3890990")> _
Public Interface WebSiteMiscEvents _
Implements _WebSiteMiscEvents, _dispWebSiteMiscEvents_Event
'使用
Dim instance As WebSiteMiscEvents
[GuidAttribute("9D9D4002-3258-4EBB-BF58-AF62C3890990")]
public interface WebSiteMiscEvents : _WebSiteMiscEvents,
_dispWebSiteMiscEvents_Event
[GuidAttribute(L"9D9D4002-3258-4EBB-BF58-AF62C3890990")]
public interface class WebSiteMiscEvents : _WebSiteMiscEvents,
_dispWebSiteMiscEvents_Event
public interface WebSiteMiscEvents extends _WebSiteMiscEvents, _dispWebSiteMiscEvents_Event
解説
WebSiteMiscEventsClass オブジェクトに対するこのインターフェイスを取得するには、WebSiteMiscEvents プロパティを使用します。
![]() |
---|
このクラスで提供される機能は、Visual Studio 2005 以降のバージョンの Visual Studio で使用できます。Visual Web Developer Express Edition では使用できません。 |
例
次に示すマクロ コードの例は、DTE (Development Tools Extensibility) オブジェクトを介して現在の VSWebSite オブジェクトへの参照を作成する方法と、イベントをサブスクライブする方法を示しています。このサンプルは、VSWebSiteEvents に関するコード サンプルの一部です。
' Initialize the VsWebSite and the Events
Sub InitAssemblyRefsEvents()
' Get a reference to the first Web site
' in the current solution
Dim ws As VsWebSite.VSWebSite = _
DTE.Solution.Projects.Item(1).Object
' Attach the Web site events to module events
AssemblyRefsEvents = _
ws.VSWebSiteEvents.AssemblyReferencesEvents
End Sub
' Declare the event
' The macro IDE requires the attribute
' in order to trap the events
<System.ContextStaticAttribute()> _
Public WithEvents MiscEvents As _
VsWebSite.WebSiteMiscEvents