![]() |
||||
|
This article explains how to get the programmable inner object of a Visual Studio .NET toolwindow from an add-in or macro. More Information Some Visual Studio toolwindows can be automated using its inner object, which is detailed in the following table:
Note: the Class View does not provide a programmable object. There are several ways of getting the programmable object inside a toolwindow:
Dim objWindow As EnvDTE.Window Dim objToolBox As EnvDTE.ToolBox objWindow = DTE.Windows.Item(EnvDTE.Constants.vsext_wk_Toolbox) objToolBox = CType(objWindow.Object, EnvDTE.ToolBox) To know the actual type returned by Window.Object, see HOWTO: Know the actual type behind a System.__ComObject type returned by an .Object property.
Dim objToolBox As EnvDTE.ToolBox objToolBox = CType(DTE, DTE2).ToolWindows.ToolBox objToolBox = CType(CType(DTE, DTE2).ToolWindows.GetToolWindow( _ EnvDTE.Constants.vsext_wk_Toolbox), EnvDTE.ToolBox) Go back to the 'Resources for Visual Studio .NET extensibility' section for more articles like this
You can code, design, locate code and document your apps much faster using VB.NET, C#, C++ or Visual J#:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||