WindowEventsClass.WindowActivated 事件

定义

当窗口接收到焦点时发生。

此 API 支持产品基础结构,不能在代码中直接使用。

public:
 virtual event EnvDTE::_dispWindowEvents_WindowActivatedEventHandler ^ WindowActivated;
public:
 virtual event EnvDTE::_dispWindowEvents_WindowActivatedEventHandler ^ WindowActivated;
public virtual event EnvDTE._dispWindowEvents_WindowActivatedEventHandler WindowActivated;
member this.WindowActivated : EnvDTE._dispWindowEvents_WindowActivatedEventHandler 
Public Overridable Custom Event WindowActivated As _dispWindowEvents_WindowActivatedEventHandler Implements WindowActivated

事件类型

_dispWindowEvents_WindowActivatedEventHandler

实现

示例

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

注解

WindowActivated 在完全初始化环境之前,不会出现此问题,并且在启动环境的过程中第一个窗口无法获得焦点。

适用于