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.





[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 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...")
End Sub

See Also

Properties, Methods, and Events

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