我安排了 VisualStudio2010,使得输出、错误列表、查找结果和许多其他窗口出现在同一个“区域”中。我不知道这个术语是否正确,它们以标签的形式相邻出现。 有没有办法同时关闭所有这些窗户,最好是一个快捷键?
编辑: 关于这里可能的副本: 关闭 VisualStudio 中的所有工具窗口?。 这是一个相当接近的问题,我没有看到它之前发布。但是有一个区别,我只想关闭一个特定“区域”内的所有窗口,而不是解决方案资源管理器或属性。然而,我猜想从答案中修改宏应该是可能的:
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