次の方法で共有


WindowEventsClass.WindowActivated イベント

この API は、.NET Framework インフラストラクチャをサポートします。独自に作成したコードから直接使用するためのものではありません。

ウィンドウがフォーカスを受け取ったときに発生します。

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

構文

'宣言
Public Overridable Event WindowActivated As _dispWindowEvents_WindowActivatedEventHandler
public virtual event _dispWindowEvents_WindowActivatedEventHandler WindowActivated
public:
virtual  event _dispWindowEvents_WindowActivatedEventHandler^ WindowActivated {
    void add (_dispWindowEvents_WindowActivatedEventHandler^ value);
    void remove (_dispWindowEvents_WindowActivatedEventHandler^ value);
}
abstract WindowActivated : IEvent<_dispWindowEvents_WindowActivatedEventHandler,
    EventArgs>
override WindowActivated : IEvent<_dispWindowEvents_WindowActivatedEventHandler,
    EventArgs>
JScript では、イベントは使用できません。

実装

_dispWindowEvents_Event.WindowActivated

解説

WindowActivated は、環境が完全に初期化されるまで発生しません。また、環境の起動中にフォーカスを受け取った最初のウィンドウでは発生しません。

Public Sub WindowEvents_WindowActivated(ByVal GotFocus As EnvDTE.Window, ByVal LostFocus As EnvDTE.Window) Handles WindowEvents.WindowActivated
   MsgBox("test")
End Sub

.NET Framework セキュリティ

  • 直前の呼び出し元に対する完全な信頼。このメンバーは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

関連項目

WindowEventsClass クラス

EnvDTE 名前空間