9

I've just started using VS2005, mostly I've stuck to VS6 as up till now it did everything I wanted.

I like to maximize the space available and remove clutter so I only want to see the source window and files-in-project list (oddly named "solution explorer" here). So when the output window appears, I want to be able to quickly remove it when I've finished with it, and to do so with a single keystroke and NOT the mouse. I used to be able to do this quite easily in VS6 because the "view" function was a toggle, but it seems in VS2003 and later this is a view "on" only - which seems a stupid removal of a useful function.

So has anyone got a way to use a single key to perform a toggle function on the output window (and any other of the many windows that might come up)? I know there's a "closetoolwindow" function but this has to be a different key and only works if the focus is in that window, so it's a pain.

4

6 回答 6

13

您可以使用 Shift + Esc 关闭任何工具窗口。要带来一个工具窗口,您可以使用 Ctrl+W ...

于 2011-03-05T10:36:17.317 回答
8

可悲的是,在 2013 年,转义键无法关闭输出窗口(它实际上切换回代码窗口,我认为这也很有用)。作为一个键盘狂,我必须:Ctrl+ Alt+O专注于工具窗口,然后shift+esc关闭它。

于 2014-11-18T03:55:10.087 回答
4

工具 -> 宏 -> 宏 IDE

右键单击MyMacros,然后选择Make new item并复制并粘贴:

Option Strict Off
Option Explicit Off
Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics

Public Module YourModuleName
    Sub YourMacroName()
        DTE.Windows.Item(Constants.vsWindowKindOutput).Close()
    End Sub
End Module

然后关闭它,转到工具-> 选项-> 键盘并将其绑定到您想要的键。

编辑(见回复)

根据要求,这将切换它:

Option Strict Off
Option Explicit Off
Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics

Public Module YourModuleName
    Sub YourMacroName()
        If (DTE.Windows.Item(Constants.vsWindowKindOutput).Visible) Then
            DTE.Windows.Item(Constants.vsWindowKindOutput).Visible = False
        Else
            DTE.Windows.Item(Constants.vsWindowKindOutput).Visible = True
        End If
    End Sub
End Module
于 2009-12-17T13:43:40.793 回答
2

点击 X 或图钉暂时摆脱它。

我在 VS 中使用键盘快捷键 Alt-shift-enter 将其最大化到整个窗口(我不知道这在 VS05 中是否绝对可用,但在 VS08 中)。

这将使您的代码窗口全屏显示并摆脱所有内容,直到您再次按下组合键。

于 2009-12-17T13:35:30.190 回答
1

不是你的问题的真正答案,但这就是我所做的:

请记住,浮动窗口(如输出窗口、解决方案资源管理器等)是可停靠的。
因此,我将感兴趣的窗口(输出窗口、属性窗口、解决方案资源管理器)停靠在一起,然后将它们移动到我的第二个屏幕。

这意味着,在我的主屏幕上,我只有代码视图,而在我的第二个屏幕上,我有输出窗口、解决方案资源管理器等......

于 2009-12-17T13:35:39.020 回答
1

不幸的是,我最终不得不从 VS6 切换到 VS 2010,因为 VS6 在 Windows 7 上不再工作。这让我发疯了,我不明白人们如何使用这个垃圾界面,我花了一个小时进行自定义以使其接近 VS6,并且仍然到处都是窗口和无价值信息的选项卡,并且 GUI 空间被浪费在带有边框的屏幕上。我还对编辑源文件、编译和运行游戏的标准工作流程进行了一些基准测试,在从 2006 系统升级到快近 4 倍的 CPU 之后,这个 IDE 是多么糟糕的 POS,a更快的 SSD 和三倍的内存,VS 2010 在我的测试中平均慢了 47%!

于 2011-01-13T22:00:46.800 回答