How to Add Button Menu in a Toolbar in Vb6

To do this, you must add first a component go to PROJECT>COMPONENTS>Microsoft
Windows Common Controls SP6, then add tool bar on the form, and follow the steps on the
image below:

1.) Right-click the tool bar and click properties






















at the Caption text property just write,for example Reports and at the Style: select 5 or
tblDropDown, then at the Button Menus click INSERT ButtonMenu and at Text: (your
sub menu name), and at Key: (for example "PR") declaring for a sub menu Key is very
important because this is your sub menu identification.

2.) Then during Run-Time will look like this

















a example code on this sub menu reports will look like this: place the code on
ToolBar1_ButtonMenuClick like shown in the statement Below:

Private Sub Toolbar1_ButtonMenuClick(ByVal ButtonMenu As _
MSComctlLib.ButtonMenu)
    Select Case ButtonMenu.Key
        Case "PR"
            MsgBox "(your code goes here!"
    End Select
End Sub

Happy Coding ^_^
The Hardest Thing to Do is to Do Nothing
Continue Reading with Borgy's Blog »
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

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

Continue Reading with Borgy's Blog »
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

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