This documentation is archived and is not being maintained.

WindowConfigurations Collection

Visual Studio .NET 2003

The WindowConfigurations collection contains all named window configurations created for the environment.

DTE

   WindowConfigurations

[Visual Basic .NET]
Public Interface WindowConfigurations
    Inherits IDispatch
[Visual Basic 6]
Class WindowConfigurations
[C++]
interface WindowConfigurations : IDispatch
[C#]
public interface WindowConfigurations : IDispatch
[JScript .NET]
public interface WindowConfigurations extends IDispatch

Remarks

You can save your current window layout in the Visual Studio environment as a named window configuration. The WindowConfigurations collection contains all such configurations.

Example

Sub WindowConfigurationsExample()
   ' Set references to all necessary objects.
   Dim colWinConfig As WindowConfigurations
   Dim objWinConfig As WindowConfiguration

   colWinConfig = DTE.WindowConfigurations

   MsgBox("Number of configurations: " & colWinConfig.count)
   ' List all saved named window configurations
   FillMsg(colWinConfig)
   ' Create a new window configuration
   objWinConfig = colWinConfig.Add("NewLayout")
   FillMsg(colWinConfig)
   ' Get rid of the new window configuration
   objWinConfig.Delete()
   MsgBox("Number of configurations: " & colWinConfig.count)
   FillMsg(colWinConfig)
End Sub

Sub FillMsg(ByVal colWinConfig As Object)
   ' Lists all currently available named window configurations
   Dim lCtr As Long
   Dim strMsg As String

   For lCtr = 1 To colWinConfig.count
      strMsg = strMsg & "Configuration name " & lCtr & ": " & colWinConfig.Item(lCtr).Name & vbCr
   Next lCtr
   strMsg = "Current Configurations: " & vbCr & strMsg
   MsgBox(strMsg)
End Sub

See Also

WindowConfiguration Creation Example | WindowConfiguration Selection Example | Properties, Methods, and Events | WindowConfiguration Object

Show: