次の方法で共有


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)

Syntax

'宣言
Function SetIDOfTab ( _
    lpszTabName As String, _
    lpszTabID As String _
) As Integer
'使用
Dim instance As IVsToolbox3
Dim lpszTabName As String
Dim lpszTabID As String
Dim returnValue As Integer

returnValue = instance.SetIDOfTab(lpszTabName, _
    lpszTabID)
int SetIDOfTab(
    string lpszTabName,
    string lpszTabID
)
int SetIDOfTab(
    [InAttribute] String^ lpszTabName, 
    [InAttribute] String^ lpszTabID
)
function SetIDOfTab(
    lpszTabName : String, 
    lpszTabID : String
) : int

Parameters

  • lpszTabName
    Type: System.String

    [in] The localized name of the Toolbox tab.

  • lpszTabID
    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.

Remarks

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.

Permissions

See Also

Reference

IVsToolbox3 Interface

IVsToolbox3 Members

Microsoft.VisualStudio.Shell.Interop Namespace