CommandWindow Schnittstelle

Definition

Stellt das Befehls Fenster in der Umgebung dar.

public interface class CommandWindow
public interface class CommandWindow
__interface CommandWindow
[System.Runtime.InteropServices.Guid("509B9955-7303-48C9-90D4-E165B974E6BA")]
[System.Runtime.InteropServices.TypeLibType(4160)]
public interface CommandWindow
[<System.Runtime.InteropServices.Guid("509B9955-7303-48C9-90D4-E165B974E6BA")>]
[<System.Runtime.InteropServices.TypeLibType(4160)>]
type CommandWindow = interface
Public Interface CommandWindow
Attribute

Beispiele

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 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  
void CommandWinExample(_DTE dte)   
{  
    // Get a reference to the Command window.  
    Window win =      
    dte.Windows.Item(EnvDTE.Constants.vsWindowKindCommandWindow);  
    CommandWindow CW = (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.  
    MessageBox.Show("Clearing the Command window...");  
    CW.Clear();  
}  

Hinweise

Verweisen Sie mit auf dieses Objekt DTE.Windows.Item(vsWindowKindCommand).Object .

Eigenschaften

DTE

Ruft das Erweiterbarkeitsobjekt der obersten Ebene ab.

Parent

Ruft das unmittelbar übergeordnete Objekt eines angegebenen Objekts ab.

TextDocument

Ruft den TextDocument für das Fenster oder den Bereich ab.

Methoden

Clear()

Löscht den gesamten Text aus dem Fenster.

OutputString(String)

Sendet eine Text Zeichenfolge an das Befehls Fenster.

SendInput(String, Boolean)

Sendet eine Zeile der Eingabe an das Befehls Fenster, das verarbeitet wird, als ob Sie es eingegeben haben.

Gilt für