关闭Visual Studio中的所有选项卡

问题描述:

我已经对Visual Studio 2010进行了排列,以使输出,错误列表,查找结果和许多其他窗口出现在同一区域"中.我不知道这是否是正确的用语,它们以选项卡的形式并排显示. 有没有一种方法可以同时关闭所有这些窗口,最好是使用键盘快捷键?

I've arranged Visual Studio 2010 such that output, error list, find results and many other windows appear in the same "region". I don't know if that's the correct term, they appear as tabs next to each other. Is there a way to close all these windows at the same time, preferable a keyboard shortcut?

关于此处可能的重复项:关闭Visual Studio中的所有工具窗口吗? . 这是一个非常接近的问题,我在发布之前没有看到它.虽然有区别,但是我只想关闭特定区域"内的所有窗口,而不是解决方案资源管理器或属性.但是我想应该可以从答案中修改宏:

About the possible duplicate here: Close all tool windows in Visual Studio?. That is a pretty close question, and I didn't see it before posting. There is a difference though, I only want to close all windows inside a particular "region" not the solution explorer or properties. However I guess it should be possible to modify the macro from the answer:

Public Sub CloseAllToolWindows()
Dim items As EnvDTE.Windows = DTE.Windows
Dim item As Window

   For Each item In items
        If item.Kind = "Tool" And item.Visible And Not item.IsFloating And _
           item.Caption <> "Solution Explorer" And _
           item.Caption <> "Properties" And _
           item.Caption <> "To-do Explorer" And _
           item.Caption <> "Macro Explorer" Then
            item.Close()
        End If
    Next
End Sub

转到Window -> Close All Documents

快捷方式是ALT W+L