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
Solved

Adding pictures to a tool bar!

Posted on 2000-03-24
5
163 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
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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

828 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