次の方法で共有


WebReferencesEvents インターフェイス

更新 : 2007 年 11 月

VSWebSiteWebReferences プロパティのイベントを表します。WebReferencesEventsClass で提供される機能にアクセスするには、このオブジェクトを使用します。

名前空間 :  VsWebSite
アセンブリ :  VsWebSite.Interop (VsWebSite.Interop.dll 内)

構文

'宣言
<GuidAttribute("63FE9F71-D793-435E-9F80-FD4082CA1444")> _
Public Interface WebReferencesEvents _
    Implements _WebReferencesEvents, _dispWebReferencesEvents_Event
'使用
Dim instance As WebReferencesEvents
[GuidAttribute("63FE9F71-D793-435E-9F80-FD4082CA1444")]
public interface WebReferencesEvents : _WebReferencesEvents, 
    _dispWebReferencesEvents_Event
[GuidAttribute(L"63FE9F71-D793-435E-9F80-FD4082CA1444")]
public interface class WebReferencesEvents : _WebReferencesEvents, 
    _dispWebReferencesEvents_Event
public interface WebReferencesEvents extends _WebReferencesEvents, _dispWebReferencesEvents_Event

解説

WebReferencesEventsClass に対するこのインターフェイスは、WebReferencesEvents プロパティから取得されます。

ms778710.alert_note(ja-jp,VS.90).gifメモ :

このクラスで提供される機能は、Visual Studio 2005 以降のバージョンの Visual Studio で使用できます。Visual Web Developer Express Edition では使用できません。

次に示すマクロ コードの例は、DTE (Development Tools Extensibility) オブジェクトを使用して現在の VSWebSite オブジェクトへの参照を作成する方法、および、Web 参照のイベントをサブスクライブする方法を示しています。このサンプルは、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 WebRefsEvents As _
    VsWebSite.WebReferencesEvents

参照

参照

WebReferencesEvents メンバ

VsWebSite 名前空間

DTE

VSWebSite

VSWebSiteEvents

VSWebSiteEvents

WebReferencesEvents

WebReferencesEventsClass

その他の技術情報

オートメーション アセンブリおよび DTE2 オブジェクトの参照

方法 : マクロでイベントを処理する