We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

CommandWindow Interface

Represents the Command window in the environment.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

<GuidAttribute("509B9955-7303-48C9-90D4-E165B974E6BA")> _
Public Interface CommandWindow
Dim instance As CommandWindow

Reference this object by using DTE.Windows.Item(vsWindowKindCommand).Object.

Sub CommandWinExample(ByVal dte As DTE)
    ' Get a reference to the Command window.
    Dim win As Window = _
    Dim CW As CommandWindow = win.Object

    ' Input a command into the Command window and execute it.
    CW.SendInput("nav http://www.microsoft.com", False)

    ' Insert some information text into the Command window.
    CW.OutputString("This URL takes you to the main Microsoft _

    ' Clear the contents of the Command window.
    MsgBox("Clearing the Command window...")
End Sub