Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vb-toolbar

Status
Not open for further replies.

mandardighe

Programmer
Nov 2, 2001
7
0
0
IN
how do i get picture / icon in the toolbat buttonmenu[dropdown]
 
Can you give us a little more information ?

Am i to assume you are using MS Common Controls Toolbar ?
 
yes i am using mscommon control toolbar.
if u have any answer to my question plz let me know.i m stuck in my program.
 
You need to store the pictures (icons) in an Image list and associate it witht he menu bar. Add the Image list to your form (its not visible @ run time) and right click/properties to add your icons (give them a key for easy ref. and make note of the image number) and close. Add tool bar, right click/properties. Now add the imagelist to the imagelist box in the form you are staring at. There will only be one in the drop down, presuming you only added one ImageList. Click buttons/add button and add the image number in the image number box (the image number was given when you added each icon to the imagelist).

You can change this programatically too, as follows:

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
If Toolbar1.Buttons(Button.Index).Image = 1 Then
Toolbar1.Buttons(Button.Index).Image = 2
Else
Toolbar1.Buttons(Button.Index).Image = 1
End If
End Sub

Wolf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top