
Signature
Lasse Vågsæther Karlsen
mailto:lasse@vkarlsen.no
http://presentationmode.blogspot.com/
PGP KeyID: 0xBCDEA2E3
> I'm hoping someone here knows how to get something like the
> VSWindowManager addin, only for Visual Studio 2008.
[quoted text clipped - 12 lines]
> automatic handling at all, I just need to be able to relatively quickly
> be able to restore the positions of the windows to some preset location.
Ok, a bit quick on the trigger, figure I can increase my chance of
getting some help if I post what I've tried.
I have the following macro code:
Private Function GetWindow(ByVal Caption As String) As EnvDTE.Window
For Index = 1 To DTE.Windows.Count
Dim result As EnvDTE.Window
result = DTE.Windows.Item(Index)
Trace.WriteLine(result.Kind & ": " & result.Caption)
If result.Kind = "Tool" And
result.Caption.StartsWith(Caption) Then
Return result
End If
Next
Return Nothing
End Function
Private Sub Position(ByVal Caption As String, ByVal x As Integer,
ByVal y As Integer, ByVal w As Integer, ByVal h As Integer)
Dim window As EnvDTE.Window = GetWindow(Caption)
window.Left = x
window.Top = y
window.Width = w
window.Height = h
End Sub
Public Sub DualMonitor()
' Position("Solution Explorer", 1284, 20, 363, 670)
' Position("Properties", 1284 + 370, 20, 363, 692)
Position("Output", 1284, 20 + 692, 1000, 300)
End Sub
Not very good I'll admit. The solution explorer is docket together with
the server explorer and toolbox, and the 670 there is the height with
the tabs at the bottom, whereas the properties window is by itself so it
has to be set to 692 and not 670.
I'd like to be able to undock and dock the windows together so that I
can make one macro that docks everything into the main window like it
appears by default, and one macro that pulls everything out and groups
the tool windows together the way I want them on a dual-monitor display.
Anyone have any pointers to how I might accomplish the docking bit?

Signature
Lasse Vågsæther Karlsen
mailto:lasse@vkarlsen.no
http://presentationmode.blogspot.com/
PGP KeyID: 0xBCDEA2E3
Lasse Vågsæther Karlsen - 11 Mar 2008 15:36 GMT
>> I'm hoping someone here knows how to get something like the
>> VSWindowManager addin, only for Visual Studio 2008.
[quoted text clipped - 57 lines]
>
> Anyone have any pointers to how I might accomplish the docking bit?
Ok, more info.
By following the data on MSDN I am now able to move the windows
correctly, undock them and "dock" them.
By "dock" I mean that I can create a frame for docking two windows into
it, and they are docked with tabs. However, as soon as I add the third
window, the frame is split into two, with the two tabs in the top half
and the third window in the bottom half, sort of like this:
+-------------------------+
| |
| first window |
| |
| |
+------+------+-----------+
| tab1 | tab2 | |
+------+------+-----------+
| |
| third window |
| |
| |
+-------------------------+
Any idea how I can make the third window be added as a tab instead of
splitting the frame in two?
I'll post my code when I'm if anyone's interested.

Signature
Lasse Vågsæther Karlsen
mailto:lasse@vkarlsen.no
http://presentationmode.blogspot.com/
PGP KeyID: 0xBCDEA2E3
Lasse Vågsæther Karlsen - 11 Mar 2008 15:38 GMT
>> I'm hoping someone here knows how to get something like the
>> VSWindowManager addin, only for Visual Studio 2008.
[quoted text clipped - 57 lines]
>
> Anyone have any pointers to how I might accomplish the docking bit?
Also, any idea on how to get hold of the "Pending Checkins" window, as
well as the "Error List" window? They don't seem to have a constant in
the Constants.vsWindowKind* list...

Signature
Lasse Vågsæther Karlsen
mailto:lasse@vkarlsen.no
http://presentationmode.blogspot.com/
PGP KeyID: 0xBCDEA2E3