Solved

Adding pictures to a tool bar!

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

777 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