Visual Basic Concepts
Adding Controls to a CoolBar
The method for adding child controls to a CoolBar control is slightly different from that of adding controls to other containers. The control must first be associated with a Band object; there is a limit of one child control per band.
To add a control to a CoolBar
With the CoolBar control selected, select a control from the ToolBox and draw it on the CoolBar.
Open the Property Page for the CoolBar and select the Bands tab.
Use the Index buttons to select the index of the Band object on which you want the control to appear.
Select the control from the Child list.
The child control will then move and resize along with the Band object at run time.
Note If you simply add a control without associating it to a band, it will appear as a floating control over the CoolBar at run time. To avoid this situation, set the Visible property of the control to False.
You can have additional controls contained on a CoolBar and swap them in and out at run time using the Child property of the Band object.