Export (0) Print
Expand All
Cut
Run
Expand Minimize

CreateLinkedWindowFrame Method

Visual Studio .NET 2003

Creates a Window object and places two windows in it.

[Visual Basic .NET]
Public Function CreateLinkedWindowFrame( _
   ByVal Window1 As Window, _
   ByVal Window2 As Window, _
   ByVal Link As vsLinkedWindowType _
) As Window
[Visual Basic 6]
Function CreateLinkedWindowFrame( _
   ByVal Window1 As Window, _
   ByVal Window2 As Window, _
   ByVal Link As vsLinkedWindowType _
) As Window
[C++]
HRESULT __stdcall CreateLinkedWindowFrame(
   Window* Window1,
   Window* Window2,
   vsLinkedWindowType Link,
   /* [out, retval] */ Window** retVal
);
[C#]
public Window CreateLinkedWindowFrame(
   Window Window1,
   Window Window2,
   vsLinkedWindowType Link
);
[JScript .NET]
public function CreateLinkedWindowFrame(
   Window1 : Window,
   Window2 : Window,
   Link : vsLinkedWindowType
) : Window

Parameters

Window1
Required. The first Window object to link to the other.
Window2
Required. The second Window object to link to the other.
Link
Required. A vsLinkedWindowType constant indicating the way the windows should be joined.

Return Value

Returns a Window object.

Remarks

The order of the Window arguments determines the order of the linked windows.

Example

Sub CreateLinkedWindowFrameExample()
   Dim Frame As Window
   Dim w1 As Window = DTE.Windows.Item(Constants.vsWindowKindSolutionExplorer)
   Dim w2 As Window = DTE.Windows.Item(Constants.vsWindowKindOutput)
   Dim w3 As Window = DTE.Windows.Item(Constants.vsWindowKindCommandWindow)

   'Create a linked window frame and dock together the Solution Explorer 
   'and Ouput windows together inside it.
   Frame = DTE.Windows.CreateLinkedWindowFrame(w1, w2, vsLinkedWindowType.vsLinkedWindowTypeDocked)
   MsgBox("Total number of windows in the linked window frame: " & Frame.LinkedWindows.Count)

   'Add an additional tool window, the Command window, to the frame with 
   'the other two.
   Frame.LinkedWindows.Add(w3)
   MsgBox("Total number of windows in the linked window frame: " & Frame.LinkedWindows.Count)

   'Resize the entire linked window frame.
   Frame.Width = 500
   Frame.Height = 600
   MsgBox("Frame height and width changed. Now changing Command window height.")

   'Resize the height of the Command window.
   Frame.LinkedWindows.Item(3).Height = 800
   MsgBox("Now undocking the Command window from the frame.")

   'Undock the Command window from the frame.
   Frame.LinkedWindows.Remove(w3)
End Sub

See Also

Applies To: Windows Collection

Show:
© 2014 Microsoft