Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CommandWindow.OutputString Method

Sends a text string to the Command window.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)
void OutputString(
	string Text


Type: System.String

Required. The text characters to send to the window.

OutputString does not automatically add new line characters to the string. If you want such characters in the string, you must add them to Text.

void CommandWinExample(_DTE dte) 
    // Get a reference to the Command window.
    Window win =    
    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 

    // Clear the contents of the Command window.
    MessageBox.Show("Clearing the Command window...");
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.