Chapter 14. Docking Windows

Like band objects, docking windows provide a way for you to add your own user interface elements to Explorer. They share another similarity with band objects in that they can exist in several locations—either at the top or bottom of Explorer’s client area as a horizontal window (see Figure 14.1) or to the left or right of the client area as a vertical window. Unlike band objects, however, you do not have to have Active Desktop installed in order to use them from both Explorer and Internet Explorer.

But there are a few drawbacks. They’re not too bad, but worth mentioning. Docking windows have no associated menu item or toolbar button. So turning them on and off will require you to write some custom code, which could possibly be a problem. This gets trickier because docking window forms must be borderless. Borderless windows cannot have menus. If you define one, VB will add a title bar to the window. So you will not even be able to define a pop-up menu. Also, docking windows don’t have the innate ability to be resized like Explorer and Communication bands. If you remember (think way back to the last chapter), a band object’s container is automatically sized in response to Explorer being resized. Docking windows have no such luxury. While Explorer does provide size information to the docking window, the docking window itself must take responsibility for positioning itself. In fact, a majority of a docking window’s time is spent figuring out its own position ...

Get VB Shell Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.