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.