Ver versión en español    
 
Home
10 Reasons to use MZ-Tools
MZ-Tools 6.0 for VS.NET
Editions
Features
Online Documentation
MZ-Tools SDK
Download
Purchase
Version History (RSS)  
FAQ & Support
MZ-Tools 3.0 for VB6 & VBA
Features
Online Documentation
Download (freeware)
Donations (Paypal)
Version History (RSS)  
FAQ & Support
User Reviews
Community Place
Contact  
For Add-In Developers
About
   
 
User Testimonials

I'm an avid supporter of MZ-Tools. It's a product I couldn't do without and your level of support is outstanding.

Jan Hyde (Visual Basic MVP)

You will soon wonder how you ever lived without it.

Andy Maggs

More user reviews
 
HOWTO: Understanding toolwindow states in Visual Studio

Author: Carlos J. Quintero (Microsoft MVP) Applies to: Microsoft Visual Studio .NET 2002
Date: May 2006   Microsoft Visual Studio .NET 2003
      Microsoft Visual Studio 2005
Introduction

Visual Studio provides two kinds of windows (apart from the main window of the IDE):

  • Document windows: these are the windows used to show the source code of a file or the designer of a form. Usually these windows appear tabbed inside the main window of the IDE (although it can be configured to appear as MDI child windows).
  • Toolwindows: these are auxiliar windows to provide some functionality in the IDE. For example, the Solution Explorer or the Properties window.

In turn, a toolwindow can be in three states:

  • Docked (or linked): they are attached to some edge of the main IDE. Usually this is the case of the Solution Explorer or the Properties window. Several docked toolwindows can appear together too (one of them hide the others), and in this case they show tabs (this is usually the case of the Solution Explorer and the Class View).
  • Floating: they appear over the main window, outside of it, floating on the screen. People use this state to move them to a secondary monitor to gain space in the main window.
  • Tabbed: they appear as if they were document windows, although they are still toolwindows. Usually this is the case of the Start Page or the Object Browser.

Notice that any toolwindow can be in any of those states. It just happens that some toolwindows are preset to appear in a specific state.

More Information

You can set the state of a toolwindow manually through the context menu of its caption, with offers at least the following menu entries:

  • Floating
  • Dockable

Notice that these two properties provide actually four and not three states as explained before, because a toolwindow can be floating even if the Floating menu entry is unchecked, as long as it is not docked.

You can also set the state of a toolwindow programatically. This article assumes that you have already created a toolwindow using the EnvDTE.Windows.CreateToolwindow and that you already have the EnvDTE.Window object returned by that function (showing the code to create a toolwindow is beyond the scope of this article, check the MSDN documentation about that function).

The state of a toolwindow can be set programatically through two properties of the EnvDTE.Window class:

  • IsFloating
  • Linkable

Notice that although the user interface uses the term "Dockable", the extensibility model uses the term "Linkable".

For example, to make a toolwindow to appear as a tabbed window, you have to set both properties to false.

Go back to the 'Resources for Visual Studio .NET extensibility' section for more articles like this

MZ-Tools 6.0 for Visual Studio .NET

You can code, design, locate code and document your apps much faster using VB.NET, C#, C++ or Visual J#:

Buy MZ-Tools Now Download MZ-Tools Demo

   Top