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

Else

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.

Try

window.Visible = showToolWindows

Catch exception As Exception

End Try

End If

Next

End Sub

No comments: