10. Write a VB program to create standard toolbar on to the form.(Toolbar contains at least five buttons.)

Private Sub Form_Load()
Toolbar1.ImageList = ImageList1
Dim b1 As Button
Set b1 = Toolbar1.Buttons.Add
b1.Style = tbrDefault
b1.Caption = “New”
b1.Image = 1

Dim b2 As Button
Set b2 = Toolbar1.Buttons.Add
b2.Style = tbrDefault
b2.Caption = “Open”
b2.Image = 2

Dim b3 As Button
Set b3 = Toolbar1.Buttons.Add
b3.Style = tbrDefault
b3.Caption = “Save”
b3.Image = 3

Dim b4 As Button
Set b4 = Toolbar1.Buttons.Add
b4.Style = tbrDefault
b4.Caption = “Copy”
b4.Image = 4

Dim b5 As Button
Set b5 = Toolbar1.Buttons.Add
b5.Style = tbrDefault
b5.Caption = “Paste”
b5.Image = 5
End Sub


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s