This documentation is archived and is not being maintained.

Clear Method (General Extensibility)

Visual Studio .NET 2003

Clears all text from the object.

[Visual Basic .NET]
Public Sub Clear() 
[Visual Basic 6]
Sub Clear() 
HRESULT __stdcall Clear();
void Clear();
[JScript .NET]
public function Clear()



Sub ClearExample()
   ' Create a tool window handle for the Output window.
   Dim win As Window = DTE.Windows.Item(EnvDTE.Constants.vsWindowKindOutput)
   ' Create handles to the Output window and its panes.
   Dim OW As OutputWindow = win.Object
   Dim OWp As OutputWindowPane

   ' Add a new pane to the Output window.
   OWp = OW.OutputWindowPanes.Add("A New Pane")
   ' Add a line of text to the new pane.
   OWp.OutputString("Some Text")
   MsgBox("Now clear the Output window.")
End Sub

See Also

Applies To: CommandWindow Object | OutputWindowPane Object | StatusBar Object | WizCombo Object