共用方式為


OutputWindowPane 介面

表示 [輸出] 視窗中的窗格。

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

語法

'宣告
<GuidAttribute("FFC9DFC4-61CA-4B0C-83C2-0703A24F5C16")> _
Public Interface OutputWindowPane
[GuidAttribute("FFC9DFC4-61CA-4B0C-83C2-0703A24F5C16")]
public interface OutputWindowPane
[GuidAttribute(L"FFC9DFC4-61CA-4B0C-83C2-0703A24F5C16")]
public interface class OutputWindowPane
[<GuidAttribute("FFC9DFC4-61CA-4B0C-83C2-0703A24F5C16")>]
type OutputWindowPane =  interface end
public interface OutputWindowPane

OutputWindowPane 型別會公開下列成員。

屬性

  名稱 說明
公用屬性 Collection 取得集合,此集合包含支援此屬性的 OutputWindowPane 物件。
公用屬性 DTE 取得最上層擴充性物件。
公用屬性 Guid 取得 OutputWindowPane 物件的 GUID。
公用屬性 Name 取得 OutputWindowPane 物件的名稱。
公用屬性 TextDocument 取得 OutputWindowPane 的 TextDocument 物件。

回頁首

方法

  名稱 說明
公用方法 Activate 將焦點移至目前的項目。
公用方法 Clear 從 OutputWindowPane 清除所有文字。
公用方法 ForceItemsToTaskList 傳送所有未加入至工作清單的工作項目。
公用方法 OutputString 傳送文字字串到 OutputWindowPane 視窗。
公用方法 OutputTaskItemString 在 [輸出] 視窗中顯示字串,並將對應的項目加入 [工作清單]。

回頁首

備註

[輸出] 視窗會顯示文字輸出。 [輸出] 視窗可以擁有一或多個窗格,以 OutputWindowPane 物件表示。 每個 IDE 工具可能使用不同的輸出視窗窗格。 窗格是用視窗最上方的下拉式方塊所選取的。 例如,建置錯誤移至 [建置錯誤] 窗格,而各外部命令工具可能會移至其本身個別的輸出視窗窗格。

範例

Sub OutputWindowPaneExample()
   ' Create a tool window handle for the Output window.
   Dim win As Window = DTE.Windows.Item(EnvDTE.Constants.vsWindowKindOutput)
   ' Create handles to the Output window and its panes.
   Dim OW As OutputWindow = win.Object
   Dim OWp As OutputWindowPane

   ' Add a new pane to the Output window.
   OWp = OW.OutputWindowPanes.Add("A New Pane")
   ' Add a line of text to the new pane.
   OWp.OutputString("Some Text")
End Sub

請參閱

參考

EnvDTE 命名空間