Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CommandWindow Object

Visual Studio .NET 2003

Represents the Command window in the environment.

DTE

   Windows

      Window

         CommandWindow

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

Remarks

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

Requirements

Namespace: EnvDTE

File: dte.olb

Example

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 http://www.microsoft.com", 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...")
    CW.Clear()
End Sub

See Also

Properties, Methods, and Events

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.