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.



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


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


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
   ' Create a new window configuration
   objWinConfig = colWinConfig.Add("NewLayout")
   ' Get rid of the new window configuration
   MsgBox("Number of configurations: " & colWinConfig.count)
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
End Sub

See Also

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