Adding ToolBar in Visual Basic .NET

Last Updated: March 19, 2020

To add ToolBar in VB.NET, you can use ToolStrip control in the Toolbox. You can see this control under Menus and Toolbars section of the Toolbox

You simple drag the ToolStrip control from Toolbox and drop it on the Form

toolbar desin

You can see there are several options for tool buttons. You have Button,Label,SpiltButton,DropDownButton,Sperator,ComboBox,TextBox,ProgressBar

In the following figure, I have added some button and I have added images to Image Property of the ToolStripButton. Message Box has been added to click event of the ToolStripButton

Tool Bar Run

This is the code used to display the MessageBox. You can code the other ToolStripButton in same manner

Public Class Form1

    Private Sub NewToolStripButton_Click(sender As Object, e As EventArgs) Handles NewToolStripButton.Click
        MessageBox.Show("New document")

    End Sub
End Class