How to Add Toolbar in Vb6

 This Tutorial will Show you on how to add a Toolbar Control on your visual Basic program,
just follow the few steps below:

 1.) Go to Project Tab like shown on the image below then click Components






















 2.)the components dialog box will prompt,and just simply find the Microsoft windows 
common Controls 6.0 (sp6),like what i did on the image below,then click Apply button



















3.)As you notice the 8 controls will added on your tool box pane,but as of now,we are
concentrating on tool bar control,to do that just drag the tool bar control on your
form window,then right click on it then click properties like shown on the image below.















The Toolbar property pages will prompt.






















4.) At the buttons Tab just Click Insert button,and at Caption just put your desired name,at
the Example i add File and Folder and for the Tool-tip are File and Folder also then
click Apply.






















5.) Then, this will look like this


















6.) Then Press F5 key,to run your program have you notice that,pointing a mouse on the button,
the desired tool-tip word on each button will appear.
                                                                                                       

This is the Basic Coding for toolbar Control:

Private Sub Toolbar1_ButtonClick(ByVal Button As 
                                          MSComctlLib.Button)

    If Button.Index = 1 Then

        MsgBox "Your Code Goes Here"

    ElseIf Button.Index = 2 Then

        MsgBox "Your Code Goes Here"

    End If

End Sub


The Hardest Thing to Do is to Do Nothing


Happy Coding (^_^)
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Leave a comment

Copyright @ Codes-47.Blogspot.Com. Powered by Blogger.