We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

IVsToolbox3.SetIDOfTab Method

Sets the canonical ID for the given Toolbox tab.

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

int SetIDOfTab(
	string lpszTabName,
	string lpszTabID


Type: System.String
[in] The localized name of the Toolbox tab.
Type: System.String
[in] The locale-invariant ID of the Toolbox tab.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

COM Signature

From vsshell80.idl:

HRESULT IVsToolbox3::SetIDOfTab(
   [in] LPCOLESTR lpszTabName,
   [in] LPCOLESTR lpszTabID

The method sets a canonical ID for the given Toolbox tab. The canonical ID, supplied as lpszTabID, is different from the localizable tab name defined when AddTab is called.

While canonical tab names are required to be unique, localized strings change depending on the locale under which the IDE is running. Therefore, the canonical ID must be locale-invariant.

There are no particular restrictions on the format of the canonical ID string, a GUID might be used, or an easy to remembered string in the language of the developer could be employed.

Any VSPackage that creates a Toolbox tab should call the SetIDOfTab method.