Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Adding pictures to a tool bar!

Posted on 2000-03-24
5
Medium Priority
?
175 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 30 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…
Suggested Courses

782 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