ToolWindows.OutputWindow 屬性

取得 OutputWindow 物件。

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

語法

'宣告
ReadOnly Property OutputWindow As OutputWindow
    Get
OutputWindow OutputWindow { get; }
property OutputWindow^ OutputWindow {
    OutputWindow^ get ();
}
abstract OutputWindow : OutputWindow
function get OutputWindow () : OutputWindow

屬性值

型別:EnvDTE.OutputWindow
OutputWindow 物件。

範例

這個範例會新增名為「我的輸出」的 [輸出視窗] 並加以啟動,接著在其中輸入文字後便加以清除。 如需如何像執行增益集一般,執行這個範例的詳細資訊,請參閱 HOW TO:編譯和執行 Automation 物件模型程式碼範例

Imports EnvDTE
Imports EnvDTE80
Public Sub OnConnection(ByVal application As Object, _
 ByVal connectMode As ext_ConnectMode, ByVal addInInst As Object, _
 ByRef custom As Array) Implements IDTExtensibility2.OnConnection
    _applicationObject = CType(application, DTE2)
    _addInInstance = CType(addInInst, AddIn)
    OutputWindowManip(_applicationObject)
End Sub
Public Sub OutputWindowManip(ByVal dte As DTE2)
    Dim myOut As OutputWindow
    myOut = _applicationObject.ToolWindows.OutputWindow
    Dim myPane As OutputWindowPane
    MsgBox("Creating an output window.")
    myPane = myOut.OutputWindowPanes.Add("My output")
    myPane.Activate()
    MsgBox("Adding some text to the output window...")
    myPane.OutputString("Adding some text to the output window.")
    MsgBox("Clear the text")
    myPane.Clear()
End Sub
using EnvDTE;
using EnvDTE80;
using System.Windows.Forms;
public void OnConnection(object application,
 ext_ConnectMode connectMode, object addInInst, ref Array custom)
{
    _applicationObject = (DTE2)application;
    _addInInstance = (AddIn)addInInst;
    OutputWindowManip(_applicationObject);
}
public void OutputWindowManip(DTE2 dte)
{
    OutputWindow myOut;
    myOut = _applicationObject.ToolWindows.OutputWindow;
    OutputWindowPane myPane;
    MessageBox.Show("Creating an output window...");
    myPane = myOut.OutputWindowPanes.Add("My output");
    myPane.Activate();
    MessageBox.Show("Adding some text to the output window...");
    myPane.OutputString("Adding some text to the output window.");
    MessageBox.Show("Clear the text");
    myPane.Clear();
}

.NET Framework 安全性

請參閱

參考

ToolWindows 介面

EnvDTE80 命名空間