IVsToolbox2 Interface


Used to manage the Toolbox.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

public interface IVsToolbox2 : IVsToolbox

System_CAPS_pubmethodAddActiveXItem(Guid, String, IVsHierarchy)

Allows ActiveX controls to be programmatically added to the Toolbox.

System_CAPS_pubmethodAddActiveXItem2(Guid, String, IVsHierarchy, Guid)

Adds an ActiveX item to the Toolbox.

System_CAPS_pubmethodAddItem(IDataObject, TBXITEMINFO[], String)

Adds a data object to the specified tab in the Toolbox.

System_CAPS_pubmethodAddItem2(IDataObject, TBXITEMINFO[], String, Guid)

Adds an item to the referenced Toolbox tab, specifying a package GUID.

System_CAPS_pubmethodAddItemFromFile(String, IVsHierarchy, Int32)

Allows files to be programmatically added to the Toolbox.

System_CAPS_pubmethodAddItemFromFile2(String, IVsHierarchy, Guid, Int32)

Adds an item to the Toolbox from a file, specifying a package GUID.


Adds a new tab to the Toolbox.

System_CAPS_pubmethodAddTab2(String, Guid)

Adds a tab to the Toolbox, specifying the tab view.

System_CAPS_pubmethodAddTabEx(String, VSTBXTABVIEW)

Adds a new tab to the Toolbox and specifies how the tabs are viewed.

System_CAPS_pubmethodAddTabEx2(String, VSTBXTABVIEW, Guid)

Adds a tab to the Toolbox, specifying a tab view and a package GUID.


Called by a designer to inform the Toolbox that the item has been pasted onto the form.

System_CAPS_pubmethodEnumItems(String, IEnumToolboxItems)

Enumerates items on a given tab in the Toolbox, or all items in the Toolbox.


Enumerates through tabs in the Toolbox.


Returns the data object for the selected item in the Toolbox.


Returns the window frame for the Toolbox.


Returns the name of the selected tab.

System_CAPS_pubmethodGetTabView(String, VSTBXTABVIEW[])

Returns the tab view for the specified tab.

System_CAPS_pubmethodIsCurrentUser(IVsToolboxUser, Int32)

Determines whether the specified Toolbox user is the current user.

System_CAPS_pubmethodRegisterDataProvider(IVsToolboxDataProvider, UInt32)

Registers a Toolbox data provider.


Removes an item from the Toolbox.


Removes a tab from the Toolbox.


Programmatically selects an item.


Programmatically selects the referenced Toolbox tab.


Sets the drop cursor for the current, enabled Toolbox item.

System_CAPS_pubmethodSetItemInfo(IDataObject, TBXITEMINFO[])

Sets information for the referenced item.

System_CAPS_pubmethodSetTabView(String, VSTBXTABVIEW)

Sets the type of view for the specified tab.


Unregisters the specified data provider.


Forces a redraw of the Toolbox UI.

See illustrations of the implementation and/or calling of this interface in the .f08872bd-fd9c-4e36-8cf2-a2a2622ef986

Additional features, useful in persisting toolboxes, can be found under the IVsToolbox3 interface.

Notes to Callers:

Called by editors, projects, and other objects that want to manipulate the shared Toolbox user interface.

Return to top