ToolBar control in Visual Basic6.0


A ToolBar control consisit of a collection of button objects used to create a toolbar that can be associated with an application.It has become one of the most important tools for providing an easy interface to the users.the toolbar control provides easy access to options available in your applications.A toolbar control contains acollection of buttons objects used to create a Toolbar.

1. Click on “Start” . Then select “All Programs, Microsoft Visual Studio 6.0 and  Microsoft Visual Basic 6.0.” .

2.  Select “Standard EXE” from the list in the New Project dialog box and click on “Open.” Click on “Project” on the menu bar, then select “Components” from the drop-down menu.

3.  Scroll down the list in the box until Microsoft Windows Common Controls 6.0 (SP4) is visible. Click on the checkbox to select the component and then click on “OK.” All components show in the Toolbox.

4. Choose the “ToolBar” control from the list of controls in the toolbox. Place the control on the form in Visual Basic.

5. Right click on toolbar a popup menu is open choose properties from popup menu.Set the properties as desired for the control.You can also add some buttons on the toolbar.For this you click on the Buttons tab and then click on the Insert Button . you add buttons as you wish.

 

 

 

 

 

 

 

 

 

 

 

 

6.We add four Buttons on the toolbar.It is shown in Figure below:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7. Double Click on toolbar.Code window is open .add code here as shown in figure:

 

 

 

 

 

8.When you are done with these steps,press<F5> to run the program.Output is given below:

 

 

 

Comments are closed.