CommandWindow (Interfaz)

Actualización: noviembre 2007

Representa la ventana Comando del entorno.

Espacio de nombres:  EnvDTE
Ensamblado:  EnvDTE (en EnvDTE.dll)

Sintaxis

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

Dim instance As CommandWindow
[GuidAttribute("509B9955-7303-48C9-90D4-E165B974E6BA")]
public interface CommandWindow
[GuidAttribute(L"509B9955-7303-48C9-90D4-E165B974E6BA")]
public interface class CommandWindow
public interface CommandWindow

Comentarios

Se hace referencia a este objeto mediante DTE.Windows.Item(vsWindowKindCommand).Object.

Ejemplos

Sub CommandWinExample(ByVal dte As DTE)
    ' 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 https://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
void CommandWinExample(_DTE dte) 
{
    // Get a reference to the Command window.
    Window win =    
    dte.Windows.Item(EnvDTE.Constants.vsWindowKindCommandWindow);
    CommandWindowCW = (CommandWindow)win.Object;

    // Input a command into the Command window and execute it.
    CW.SendInput("nav https://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.
    MessageBox.Show("Clearing the Command window...");
    CW.Clear();
}

Vea también

Referencia

CommandWindow (Miembros)

EnvDTE (Espacio de nombres)