google.com, pub-4617457846989927, DIRECT, f08c47fec0942fa0 Learn to enjoy every minute of your life.Only I can change my life.: Write a visual Basic Program to show tool bar

Monday, February 23, 2015

Write a visual Basic Program to show tool bar

Designing Window :-
First step right click on toolbox and add components it will show components popup window from it on control tab add Microsoft Windows Common Controls 6.0 (SP6) click on check box of selected items only and then click on OK button .It will show more tools like tool bar and image list on toolbox take it on form window and write the below code in coding window.


                            Fig :- Design View of program for taking tool bar on form


Code:-

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


=============================================
OUTPUT


अच्छे विचार करे विचार

  पहचान की नुमाईश, जरा कम करें... जहाँ भी "मैं" लिखा है, उसे "हम" करें... हमारी "इच्छाओं" से ज़्यादा "सुन...