Visual Basic Toolbox demo with mini title bar

This program demos a toolbox with a mini title bar.  The program contains a
main form (an MDI form in this case) and a toolbox.  The toolbox uses
setWindowPos() to make itself a topmost window, and hides itself when the
application loses the focus and shows itself when the application regains
the focus.

The toolbox uses a modified version of the smallcap code developed by
Randall Kern and Jim Cash (found as file 3-64.zip on the Microsoft
Developer's Network CD).  The modifications fall into three main areas:

1) Smallcap was not sensitive to on the fly changes in the system colors.
   By moving some code to the paint event I have made this example sensitive
   to any system color changes any time.

2) Normally, clicking on a control box and releasing the mouse button while
   it is still over the control box will bring up the system menu and leave
   it there.  Clicking again on the control box dismissed the menu.  Visual
   Basic's own toolbox and palette box do the former but not the latter
   (clicking on the control box displays the menu bar, but clicking again
   does not dismiss it - it remains visible).  The smallcap example does
   NEITHER - if you click and release on the control box the system menu
   appears and disappears.  This is because it does not use the last
   argument of the TrackPopupMenu() function which lets you specify a
   rectangle which you can click in without the menu disappearing.  I added
   this functionality.  In this example, the system menu behaves like the
   system menu on Visual Basic's toolbox - it appears and stays visible when
   you click on the control box, but is not dismissed when you click on the
   control box again.  I am working on code to do the latter.

3) I added code to the message blasters "Message" sub to check for
   activation/deactivation of the APPLCATION so that the toolbox could
   be shown/hidden as appropriate.

Tim Barham
E-Mail: t.barham@qut.edu.au
