Bagikan melalui


WindowEventsClass.WindowActivated Event

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Occurs when a window receives the focus.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Syntax

'Declaration
Public Overridable Event WindowActivated As _dispWindowEvents_WindowActivatedEventHandler
'Usage
Dim instance As WindowEventsClass 
Dim handler As _dispWindowEvents_WindowActivatedEventHandler 

AddHandler instance.WindowActivated, handler
public virtual event _dispWindowEvents_WindowActivatedEventHandler WindowActivated
public:
virtual   event _dispWindowEvents_WindowActivatedEventHandler^ WindowActivated {
    void add (_dispWindowEvents_WindowActivatedEventHandler^ value);
    void remove (_dispWindowEvents_WindowActivatedEventHandler^ value);
}
JScript does not support events.

Implements

_dispWindowEvents_Event.WindowActivated

Remarks

WindowActivated does not occur until the environment is completely initialized, and it does not occur with the first window to receive focus during startup of the environment.

Examples

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

.NET Framework Security

See Also

Reference

WindowEventsClass Class

WindowEventsClass Members

EnvDTE Namespace