CommandWindow 인터페이스

환경의 명령 창을 나타냅니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
<GuidAttribute("509B9955-7303-48C9-90D4-E165B974E6BA")> _
Public Interface CommandWindow
[GuidAttribute("509B9955-7303-48C9-90D4-E165B974E6BA")]
public interface CommandWindow
[GuidAttribute(L"509B9955-7303-48C9-90D4-E165B974E6BA")]
public interface class CommandWindow
[<GuidAttribute("509B9955-7303-48C9-90D4-E165B974E6BA")>]
type CommandWindow =  interface end
public interface CommandWindow

CommandWindow 형식에서는 다음과 같은 멤버를 노출합니다.

속성

  이름 설명
Public 속성 DTE 최상위 확장성 개체를 가져옵니다.
Public 속성 Parent 지정된 개체의 직계 개체를 가져옵니다.
Public 속성 TextDocument 창의 TextDocument 개체를 가져옵니다.

위쪽

메서드

  이름 설명
Public 메서드 Clear 창에서 모든 텍스트를 지웁니다.
Public 메서드 OutputString 텍스트 문자열을 명령 창에 보냅니다.
Public 메서드 SendInput 직접 입력한 것처럼 처리되는 입력 줄을 명령 창에 보냅니다.

위쪽

설명

DTE.Windows.Item(vsWindowKindCommand).Object를 사용하여 이 개체를 참조합니다.

예제

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);
    CommandWindow CW = (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();
}

참고 항목

참조

EnvDTE 네임스페이스