To make the Toolbar control available to you, choose Project->Components and put a check beside Microsoft Windows Common Controls 6.0. Note that this adds several control icons to the toolbar on the left of the screen.
Naming Conventions: Names of toolbars should begin with "tbr".
Click the "(Custom)" entry in the properties window, or select View->Property Pages to bring up the properties page. This has three tabs for managing toolbars. We wil use "General" to set properties shared by all the buttons, such as size and label alignment, and "Buttons" to add and remove buttons, assign their Captions, etc.
To group buttons by using a separator, use the arrow buttons to move to the button just before where you want the separator. Click Insert Button and set the Style property to tbrSeparator. Unlike menus, you do not need to give the Separator a name.
Next, go to the Buttons page. Use the arrow buttons to visit the buttons one by one, and assign a number (corresponding to the index of the icon in the ImageList) in the Image field. Note that if there are a Caption and an Image assigned to a button, both will show. To display only the icon, you must delete the Caption.
MsgBox "You clicked button " & Button.Index Button.Enabled = Falsedisplays a message with the number of the button, then disables it. You can also refer to the Toolbar's array of buttons to access the caption associated with it. This example
MsgBox "You clicked button " & tbrImages.Buttons(Button.Index)prints the caption of the button that was pressed.
If Button.Index=1 Then Call mnuEditCut).