Sub CloseBottomWindows()
DTE.Windows.Item(Constants.vsWindowKindOutput).Close()
DTE.Windows.Item(Constants.vsWindowKindFindResults1).Close()
DTE.Windows.Item(Constants.vsWindowKindTaskList).Close()
End Sub
Some of the windows may not have a "vsWindowKind" constant. In that case, you can close them by finding them by the window title.
' Hide windows that match certain titles
Sub HideOtherBottomWindows()
Dim window As Window
For Each window In DTE.Windows
'MsgBox(window.Caption)
If (window.Caption.Equals("File Finder")) Then
window.Close()
End If
If (window.Caption.Contains("Code Definition Window")) Then
window.Close()
End If
If (window.Caption.Contains("Error List")) Then
window.Close()
End If
If (window.Caption.Equals("VA Find References Results")) Then
window.Close()
End If
Next
End Sub
No comments:
Post a Comment