views:

801

answers:

5

Hi, I was wondering if anyone knows of a window manager for visual studio 2008 like this one. I really liked it, thats all i used in vs2005, and saw somewhere it supposed to work in vs2008 but it doesnt. I have tried it on many installations of vs2008 and it doesnt remember any settings. I really liked being able to easily change window layout quickly. Right now I just manuall import and export setting, but its not an instant process.

Or maybe someone knows what i have to do to make it work?

Thaknks in advance.

+1  A: 

You should contact RW on codeplex, he claims to have it working in VS2008, check out this item.

sontek
A: 

I think that I will try to mod the code myself, see what i can figure out, will make a good project :)

mattlant
+1  A: 

Will these macros do the trick for you? I did you WindowManager mentioned above, recompiling it to work for 2008, but still found it a little flakey. Also, I don't use the "Auto Apply Layouts" functionality in WindowManager, so these macros work great for me for switching from dual-monitor working to laptop-only working.

Sub DualMonitorConfiguration_Save()
    SaveWindowConfiguration("Dual Monitor Layout")
End Sub

Sub DualMonitorConfiguration_Load()
    LoadWindowConfiguration("Dual Monitor Layout")
End Sub

Sub LaptopOnlyConfiguration_Save()
    SaveWindowConfiguration("Laptop Only Layout")
End Sub

Sub LaptopOnlyConfiguration_Load()
    LoadWindowConfiguration("Laptop Only Layout")
End Sub

Private Sub SaveWindowConfiguration(ByVal configName As String)
    Dim selectedConfig As WindowConfiguration
    selectedConfig = FindWindowConfiguration(configName)
    If selectedConfig Is Nothing Then
        selectedConfig = DTE.WindowConfigurations.Add(configName)
    End If

    selectedConfig.Update()
    DTE.StatusBar.Text = "Window configuration saved: " & configName
End Sub

Sub LoadWindowConfiguration(ByVal configName As String)
    Dim selectedConfig As WindowConfiguration
    selectedConfig = FindWindowConfiguration(configName)
    If selectedConfig Is Nothing Then
        MsgBox("Window Configuration """ & configName & """ not found.")
    Else
        selectedConfig.Apply()
        DTE.StatusBar.Text = "Window configuration applied: " & configName
    End If
End Sub

Private Function FindWindowConfiguration(ByVal name As String) As WindowConfiguration
    Dim selectedLayout As WindowConfiguration

    For Each config As WindowConfiguration In DTE.WindowConfigurations
        If config.Name = name Then
            Return config
        End If
    Next

    Return Nothing
End Function
pettys
Seems you have only calls to the save method?
Lasse V. Karlsen
Thanks lassevk -- fixed.
pettys
+1  A: 

Your question was answered on the very same page where you asked it :-)

Just for the record:

To get this to work for 2008, add a new HostApplication element to the WindowManager2005.AddIn file. The file is typically found in "%APPDATA%\Microsoft\MSEnvShared\Addins". Change the version in the new element to be 9.0 (VS 2008) and it should work in both 2008 and 2005.

<HostApplication>
  <Name>Microsoft Visual Studio</Name>
  <Version>9.0</Version>
</HostApplication>
VVS
A: 

You can check out my blog post which provides the ability to list and switch window layouts: http://www.brianschmitt.com/2010/09/save-and-change-tool-layout-in-visual.html

Brian Schmitt