Share via


ToolBox 介面

表示整合式開發環境 (IDE) 中的 [工具箱]。

命名空間:  EnvDTE
組件:  EnvDTE (在 EnvDTE.dll 中)

語法

'宣告
<GuidAttribute("56FCD5AF-7F17-4C5C-AA8D-AE2BB2DDBF38")> _
Public Interface ToolBox
[GuidAttribute("56FCD5AF-7F17-4C5C-AA8D-AE2BB2DDBF38")]
public interface ToolBox
[GuidAttribute(L"56FCD5AF-7F17-4C5C-AA8D-AE2BB2DDBF38")]
public interface class ToolBox
[<GuidAttribute("56FCD5AF-7F17-4C5C-AA8D-AE2BB2DDBF38")>]
type ToolBox =  interface end
public interface ToolBox

ToolBox 型別會公開下列成員。

屬性

  名稱 說明
公用屬性 ActiveTab 取得目前在 [工具箱] 中選取的項目。
公用屬性 DTE 取得最上層的擴充性物件。
公用屬性 Parent 取得 ToolBox 物件的直屬父物件。
公用屬性 ToolBoxTabs 取得 [工具箱] 中所有索引標籤的集合。

回頁首

備註

Window 物件代表 [工具箱] 的視窗。 ToolBox 包含 ToolBoxTab 物件的集合,例如控制項。 在 [工具箱] 索引標籤中的個別項目是由 ToolBoxItem 物件表示。

名為 [剪貼簿] 的特殊索引標籤包含最後 15 個被剪下或複製到剪貼簿的項目。

在 IDE 中只有一個 ToolBox 物件。

範例

Sub ToolboxExample()
    ' Define the variables and create an object reference to the IDE's  
    ' ToolBox object.
    Dim win As Window = DTE.Windows.Item(Constants.vsWindowKindToolbox)
    Dim tlBox As ToolBox = win.Object
    Dim tbxTabs As ToolBoxTabs

    ' Create an object reference to the ToolBoxTabs object.
    tbxTabs = tlBox.ToolBoxTabs

    ' Now you can manipulate the ToolBox.
    ' List the total number of tabs in the ToolBox.
    MsgBox("Number of ToolBox tabs: " & tbxTabs.Count)
End Sub

請參閱

參考

EnvDTE 命名空間