IVsToolbox2.AddTabEx2 Method
Adds a tab to the Toolbox, specifying a tab view and a package GUID.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
‘선언
Function AddTabEx2 ( _
lpszTab As String, _
tv As VSTBXTABVIEW, _
ByRef guidPkg As Guid _
) As Integer
‘사용 방법
Dim instance As IVsToolbox2
Dim lpszTab As String
Dim tv As VSTBXTABVIEW
Dim guidPkg As Guid
Dim returnValue As Integer
returnValue = instance.AddTabEx2(lpszTab, _
tv, guidPkg)
int AddTabEx2(
string lpszTab,
VSTBXTABVIEW tv,
ref Guid guidPkg
)
int AddTabEx2(
[InAttribute] String^ lpszTab,
[InAttribute] VSTBXTABVIEW tv,
[InAttribute] Guid% guidPkg
)
abstract AddTabEx2 :
lpszTab:string *
tv:VSTBXTABVIEW *
guidPkg:Guid byref -> int
function AddTabEx2(
lpszTab : String,
tv : VSTBXTABVIEW,
guidPkg : Guid
) : int
Parameters
- lpszTab
Type: System.String
[in] The localized name of the tab to add to the Toolbox. The localized name can be obtained from the invariant non-localized name by calling GetIDOfTab.
- tv
Type: Microsoft.VisualStudio.Shell.Interop.VSTBXTABVIEW
[in] Determines whether the tab is in list view or icon view. For a list of ptv values, see VSTBXTABVIEW.
- guidPkg
Type: System.Guid%
[in] Package GUID identifying your VSPackage.
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 vsshell.idl:
HRESULT IVsToolbox2::AddTabEx2(
[in]LPCOLESTR lpszTab,
[in]VSTBXTABVIEW tv,
[in]REFGUID guidPkg
);
The uses the Package GUID to set the UI text for your Toolbox item. In the bstrText element of the TBXITEMINFO structure, you should specify a resource ID of the form "#number". This resource ID must then correspond to the UI string for the Toolbox item in your satellite DLL. The Toolbox persists the package GUID and resource ID for each Toolbox item. This enables it to reassign each Toolbox UI string in the event that the user changes the environment language (locale).
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.