The Dockable Window example shows how to create a custom dockable window for use in ArcMap. A dockable
window is a window that can exist in a floating state or be attached to the main application window. The
table of contents in ArcMap is a good example of a dockable window. The dockable window in this example is a
listbox that shows how many features are selected in each layer in the active map. This example also includes
a command called SelCount Dockable Window that is used to toggle the visibility of the dockable window.
The class for the dockable window, DockWin.cls, implements the IDockableWindowDef interface. This interface
defines the properties of the dockable window. This class also listens to MxDocument events (IDocumentEvents),
Map events (IActiveViewEvents), and PageLayout events (IActiveViewEvents). When the IActiveView SelectionChanged
event occurs, the listbox on the dockable window is updated.
The class for the command, cmdDockWin, implements the ICommand interface. This interface defines the properties
of a command that can be used in ArcMap. This command uses the IDockableWindowManager interface to get a reference
to the dockable window created in this example.

How to use:

If using the VB 6 sample, register the dll on your machine.
Use Categories to add the dll the appropriate component categories.
Add the Dockwin class to 'ESRI Mx Dockable Windows'
and cmdDockWin class to 'ESRI Mx Commands'.

If using either.NET sample, open the .NET solution file and build the
project.

Start ArcMap and add some data.

From the 'Developer Samples' command category on the Customize dialog, drag the
command to any toolbar.

Click the command. The dockable window should appear.

Try docking the window in various locations on the ArcMap application window. Try floating
the dockable window.

Select some features on the map. The selection count for each layer should be displayed in
the dockable window.