Sunday, January 25, 2009

Optimize VS workspace by hiding tool windows

Simple macro toggles all tool windows

Dim showToolWindows As Integer

Public Sub MyToggleToolWindows()

If (showToolWindows = 1) Then

showToolWindows = 0


showToolWindows = 1

End If

For Each window As Window In DTE.Windows

' Check that this is a tool window and not a document window.

If (window.Document Is Nothing) Then

' hide window.


window.Visible = showToolWindows

Catch exception As Exception

End Try

End If


End Sub

No comments: