This documentation is archived and is not being maintained.

CommandWindow Object

Visual Studio .NET 2003

Represents the Command window in the environment.





[Visual Basic .NET]
Public Interface CommandWindow
    Inherits IDispatch
[Visual Basic 6]
Class CommandWindow
interface CommandWindow : IDispatch
public interface CommandWindow : IDispatch
[JScript .NET]
public interface CommandWindow extends IDispatch


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


Namespace: EnvDTE

File: dte.olb


Sub CommandWinExample()
    ' Get a reference to the Command window.
    Dim win As Window = DTE.Windows.Item(EnvDTE.Constants.vsWindowKindCommandWindow)
    Dim CW As CommandWindow = win.Object

    ' Input a command into the Command window and execute it.
    CW.SendInput("nav", False)

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

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

See Also

Properties, Methods, and Events