ToolStripContainer
The ToolStripContainer is interesting because it helps you hide ToolStrip controls from view when you don’t need them. When you place this control onscreen, it provides four areas—left, right, top, and bottom—to place ToolStrip controls. Generally, you’ll set the Dock property for this control to Fill so that the control offers the four areas at the four sides of the client area of the application. The center section holds any application controls that you need. Figure 10 shows a typical setup.
Figure 10 The ToolStripContainer control provides containers for holding ToolStrips on every side of the client area.
You activate a particular tool strip area by clicking the arrows in the blue section of each side. Drag-and-drop a ToolStrip control into the container you want to use. Define each of the ToolStrip controls by adding controls and providing code to perform tasks. The secret to displaying or hiding the ToolStrip controls is the ToolStripContainer control’s LeftToolStripPanelVisible, RightToolStripPanelVisible, TopToolStripPanelVisible, and BottomToolStripPanelVisible properties. Setting these properties to true displays the requisite tool strip; setting them to false hides the tool strip. What the user gains is a lot of extra screen real estate for performing tasks. However, the programming time on your part is minimal.