Solved

Adding pictures to a tool bar!

Posted on 2000-03-24
5
165 Views
Last Modified: 2010-05-02
Hi i'm trying to add pictures to my toolbar control that i have placed on my form, i have also placed an imagelist control on the form. I have linked the toolbar control to the image list control. I have also added my pictures to the imagelist and given the pictures a key, when i add a button on the toolbar control and select an picture by giving it the key of the picture nothing appears on the button.

What am i doing wrong?

Chazter
0
Comment
Question by:chazter
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 32

Expert Comment

by:Erick37
ID: 2655449
Private Sub Form_Load()
    Toolbar1.ImageList = ImageList1
    'Create buttons using ImageList picture index
    Toolbar1.Buttons.Add 1, , "Button 1", tbrDefault, 1
    Toolbar1.Buttons.Add 2, , "Button 2", tbrDefault, 2
End Sub
0
 
LVL 32

Accepted Solution

by:
Erick37 earned 10 total points
ID: 2655470
More info:

"HOWTO: Add a Toolbar to a Visual Basic Project"

http://support.microsoft.com/support/kb/articles/Q161/2/57.asp
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 2655474
you keep saying key...if you are using key use index instead
0
 

Expert Comment

by:maheshsivakumar
ID: 2656182
That should be a simple problem.  BY now u should have solved it urself. But any way try using index property which is easy to assign.
0
 
LVL 5

Expert Comment

by:aminerd
ID: 2656466
It doesn't sound like you are doing anything wrong... You don't have to use the index of the picture, the keys should work fine. I use them all the time.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question