Window2::Activate Method ()
Visual Studio 2015
Moves the focus to the current item.
Assembly: EnvDTE80 (in EnvDTE80.dll)
When Activate is invoked, it is as if the user clicked the item, but no click events occur.
This example makes a text file the active window. It then uses it to iterate through the windows collection and to display the name of the containing project and project item for the window.
Before running this example, open a project in Visual Studio, add a text file named "TextFile1.txt" to it, and make it the active window.
Show: