次の方法で共有


ToolWindows.OutputWindow プロパティ

OutputWindow オブジェクトを取得します。

名前空間:  EnvDTE80
アセンブリ:  EnvDTE80 (EnvDTE80.dll 内)

構文

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

プロパティ値

型 : OutputWindow
OutputWindow オブジェクト。

この例では、"My output" というタイトルの出力ウィンドウを追加し、アクティブにして、任意のテキストを追加してから、削除します。 このアドインの例を実行する方法の詳細については、「方法 : オートメーション オブジェクト モデルのコード例をコンパイルおよび実行する」を参照してください。

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 名前空間