Tool Bars

Tool Bars allow rapid mouse interaction with a program. Normally these are at the top of the application and contain various buttons.

In advanced applications, the user can

This file explains only fixed Tool Bars.
Visual Basic | Delphi | C++ Builder

Visual Basic 6.0

The basic control is the PictureBox control. Set Add 2 lines to separate the menu from the toolbar. Make the second (lower) line longer than the first to make it easier to select.
First line
  • Name = DarkMenuSeparator_UILine
  • X1 = 0
  • Y1 = 0
  • Y2 = 0
  • BorderColor = Button Shadow (System &H80000010&)
  • Second line
  • Name = LightMenuSeparator_UILine
  • X1 = 0
  • Y1 = 22
  • Y2 = 22
  • BorderColor = Button Highlight (System &H80000014&)
  • Add the following code to make the lines the correct width
      Private Sub ButtonBar_UIPictureBox_Resize()
        DarkMenuSeparator_UILine.X2 = ButtonBar_UIPictureBox.Width
        LightMenuSeparator_UILine.X2 = ButtonBar_UIPictureBox.Width
      End Sub

    MFC provides a CToolbar class which allows a toolbar to be docked at a windows's edge or it can float. But, it is not on the tool palette.

    Visual Basic 6.0 provides ComandBars to supply both menu and toolbar functionality.

       Dim mcbMenuCommandBar As Office.CommandBarControl
    But there is no easy way to use them because they too are not on the tool palette.

    The Frame component can also contain other components, but does not have an align property.

    The help says that a wizard opens when you add a toolbar to a form. I'm sure this is a supper wizard ... but "How do you open it?"


    Delphi data

    C++ Builder

    Author: Robert Clemenzi -
    URL: http:// / user / clemenzi / technical / Languages / ToolBars.htm