Solved

Adding pictures to a tool bar!

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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…
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…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now