views:

121

answers:

3

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.

+1  A: 

Click on the X or the pushpin to get rid of it for the time being.

I use the keyboard shortcut Alt-shift-enter in VS to max it out to the entire window (I don't know if this is definitely available in VS05, but it is in VS08).

That will make your code window full-screen and get rid of everything until you hit the key combo again.

Gus
I don't want to use the mouse because that means taking my hand off the keyboard - finding the mouse, moving the mouse to the spot and clicking them getting my hand back to the keyboard. Takes much longer than just using the keyboard.
Keith Worden
A: 

Not a real answer on your question, but this is what I have done:

remember that the floating windows (like the outputwindow, solution explorer, etc...) are dockable.
So, I've docked the windows that are of interest (output window, property window, solution explorer) toghether, and then I moved them to my second screen.

This means, that, on my main screen, I only have the code-view, and on my second screen, I have the outputwindow, solution explorer, etc...

Frederik Gheysels
I have one screen.
Keith Worden
+2  A: 

Tools -> Macros -> Macros IDE

Right click MyMacros, then select Make new item and copy&paste this:

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

Then close it, go to tools -> options -> keyboard and bind it to the key you want.

Edit (see replies)

As requested, this will toggle it:

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
Andreas Bonini
Was just going to post about macros myself. Worth noting that you can record any UI operations you like into a macro using the "Record Temporary Macro" command, then save it with a name, edit if necessary, then bind that to a key (or add to toolbar/menu if desired).
U62
Still means you're using 2 keys to do the job that one key used to do. Is it possible to detect if the window is open and if not open it instead?
Keith Worden
It opens automatically when you build. Why do you need a keystroke to make it appear?
Andreas Bonini
Anyway, edited, now it's exactly as you want it. It will work only if it's initially open when you start using the macro though (it doesn't close it, it just hides it), so open it before trying the macro.
Andreas Bonini
Thanks, that seems to do the trick.It still makes no sense to me why they changed the useful toggle function to a view-only function for all these pop-ups.
Keith Worden