ToolWindows.OutputWindow Property
Gets the OutputWindow object.
Namespace: EnvDTE80
Assembly: EnvDTE80 (in EnvDTE80.dll)
Syntax
'Declaration
ReadOnly Property OutputWindow As OutputWindow
OutputWindow OutputWindow { get; }
property OutputWindow^ OutputWindow {
OutputWindow^ get ();
}
abstract OutputWindow : OutputWindow with get
function get OutputWindow () : OutputWindow
Property Value
Type: EnvDTE.OutputWindow
An OutputWindow object.
Examples
This example adds an Output Window, titled "My output", activates it, adds some text to it, and then clears it. For more information about how to run this example as an add-in, see How to: Compile and Run the Automation Object Model Code Examples.
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 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.