CommandWindow Interface
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Representa a janela de comando no ambiente.
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
- Atributos
Exemplos
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();
}
Comentários
Referencie esse objeto usando DTE.Windows.Item(vsWindowKindCommand).Object .
Propriedades
| DTE |
Obtém o objeto de extensibilidade de nível superior. |
| Parent |
Obtém o objeto pai imediato de um determinado objeto. |
| TextDocument |
Obtém o TextDocument para a janela ou painel. |
Métodos
| Clear() |
Limpa todo o texto da janela. |
| OutputString(String) |
Envia uma cadeia de texto para a janela de comando . |
| SendInput(String, Boolean) |
Envia uma linha de entrada para a janela de comando que é processada como se você a tivesse digitado. |