Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Toolbar And Image List Bug

I have found a similar question in this forum, however the solution does not work for my situation. I cannont assign an image list to my toolbar. This problem seems to correspond to our upgrade to Windows 2000. I developed the application in Windows NT and had no problems.

As long as I leave the toolbar alone it will display the icons. The moment I try to make a change and reassign the image list on the Toolbar property page it will not accept the image list (it automatically changes it to (none).

I am using VB 6.0 Professional sp 5
Windows 2000 5.0 sp1

If anyone has encountered a similar problem the help would be greatly appreciated.



View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Toolbar And Image List Bug
Hi. For a mystical reason, I cannot edit anymore the toolbar of my projects. From the moment I apply any change, the associated image list is forced to none.

What is strange is that before trying to modify the toolbar, it work perfectly, with the images on the button.

The problem also happen to a new project. I cannot associate any image list to a toolbar.

Anybody ever had this bug with VB ?

Thanks a lot

Toolbar And Image List
How can i insert the toolbar and image list into the form? Which one i should select when i press the control "T" button?

Image List And Toolbar
Experiencing a very weird problem.

Have got a Toolbar on a Form with an Image List as a source for the icons. Using the Properties Form of the Toolbar I set the associated ImageList and then assign an Icon to a button. Click OK to save, save the project.

Then when I run after full compile the correct Icons are displayed.

However, when I exit VB, restart, open the Project, an Icon from one of my other Image Lists on the Form is being displayed? The Properties of the Toolbar remain the same????

Whats going on? Anyone got any ideas?

There is no code in the Form asigning Icons to the control so nothig is running accidently.


Toolbar And Image List
Now, I created a Standard EXE in Visual Basic and added the Toobar control and the Image List control onto the form, from the Components dialog.

The thing is : how do I connect the images in the image list to the buttons in the toolbar?

It seems that regardless of what properties I set for these 2 controls, no picture appeared in the toolbar!(even though the first image in the image list is 1, and the button is at index 1 too.....I've tried setting the same value for the Key property for the corresponding image lists and toolbar indexes, but in vain)

Can anyone be kind enough to tell me how I can connect the images in the image list to the toolbar?

Please and thanks a lot!

Toolbar Icons And Image List Not Working
I created an imagelist and set the icons from in inside a toolbar at runtime with the following code...

tbrEmployeeInfo.ImageList = empNav
tbrEmployeeInfo.Buttons(1).Image = 1
tbrEmployeeInfo.Buttons(2).Image = 2
tbrEmployeeInfo.Buttons(3).Image = 3
tbrEmployeeInfo.Buttons(4).Image = 4
tbrEmployeeInfo.Buttons(5).Image = 5
tbrEmployeeInfo.Buttons(6).Image = 6
tbrEmployeeInfo.Buttons(7).Image = 7
tbrEmployeeInfo.Buttons(8).Image = 8
tbrEmployeeInfo.Buttons(9).Image = 9
tbrEmployeeInfo.Buttons(10).Image = 10

My icons are 16 X 16 and are somehow getting messed up in my imagelist when I run the app. Sometimes they work, but on random occassions the toolbar seems to be shrinking causing the icons to pixelate and have a black background. This changes the actual images in the imagelist too, so I have to go back, remove them all, and insert them in the imagelist again. The only pattern I've noticed is when I reuse icons in different imagelists. Could this be the problem?

*RESOLVED*Dynamcally Adding Images From Image List To Toolbar..
He guys need help. I am trying to loop through an imagelist and for each image, add a new button to a toolbar with that image. This is what i have so far but I get ""Invalid Key" error..

For i = 1 To ilAvatars.ListImages.Count
tbAvatar.Buttons.Add , "A" & CStr(i), , , ilAvatars.ListImages.Item("A" & i)
Next i

Connecting The Image List Control To The Toolbar Control
can you guys tell me how to connect the image list control to the toolbar control. In the book i am going through, it says i got to go to the toolbar Property Pages dialog box's ImageList option to assin images to each toolbar button.

but i can't seem to change the ImageList

Need Help About Toolbar Image ~!!
The image become black and white after i compile for the 2nd time[Ntg Changes] while it should be colourfull like the 1st time i Compile how come ???

Heres the Screen shot 1st and 2nd time after compile ~
Urgent need help thank you for reading .

Image-less Toolbar
I am creating a program with a custom interface. I use a form with no borderstyle. The backgroundpicture of the form is my interface, so the titlebar is included in that picture. I've done it this way, because the method to create custom forms is pretty difficult. But this works good enough for me.

There's only one thing what I can't work out. I wan't to use menu's in my program. But I can't use the menu editor of Visual Basic, because the menu will be on top off the form, where my titlebar has to be. Then I tried to use the standard toolbar component of Visual Basic and it almost good enough for me. The toolbar leaves always space for a picture. You can choose if you wan't the text under the picture or on the right side. But I don't wan't to use a picture at all.

What do I have to change to get rid of the unnessecary spaces on the toolbar? Or are there meaybe some other usefull toolbar components?

Greetz Irotallic

Toolbar Image
i have a toolbar control with an imagelist control. As one of the images, i have a .gif file with transparent parts in it that i created in adobe photoshop. But the transparent parts of the file don't show up transparent, they show up white. what can i do?

Image Toolbar
I'm a newbie and believe that this is most likely apples and oranges - but a friend of mine has a webpage where the image toolbar (when you put the mouse over the pic, this toolbar comes up to let you save the pic) has been disabled. This s in his web source code, which is also blocked from letting you view it. He swears there is no way to save the pic (without doing a screen print, copy, and pasting the image). Is there any way to get this enabled whether it be through a visual basic code, html, etc? I am dying to prove him wrong.

Add Image On Toolbar
I want to add a picture on the toolbar how?

Toolbar Image
Is there a way to put image on a toolbar like putting skins?

Image Transparency On A Toolbar
Hi all,

I seem to be having a bit of trouble with my icons in the ImageList once appearing in the Toolbar.
I've got several icons (in several formats: ico, bmp, gif) on the tollbar, and when running it the first time through, the icons show up alright.
After closing down the program though, and then restarting it, the icons are surrounded in a black box and you cannot make out what they are. Looking in the imagelist they are exactly the same in there.

Any ideas?


Just Another Toolbar-image Problem
this time i have some gif on the toolbarbuttons which should hav transparent backgrounds.
the gifs themselves have transparent backgrounds. If i put them into an Picturebox it works but on the toolbar they always get a white back.

Any idea how to solve this?

Image In Toolbar (problem)
Hi everybody !

I follow the step here to put an image in toolbar but I can't put a value in Image textbox ? Why ?

I have VB6 with SP6 and MSCOMCLT.OCX version is

Thanks in advance !

Image Control / Toolbar
Hi All,
I have a toolbar and an imaglist control on a form. I have 5 icons in my imagelist control. My toolbar is bound to the imagelist. I want to add a few more icons to the imagelist but it wont let me bacause it says the imagelist cannot be modified while a controle is bound to it.
How can I add more icons to the imagelist?

Add An Image To A Toolbar Menu

Toolbar Image Problem
VB6.0 NT/2000
Microsoft Toolbar control v6.0(SP4)
Microsoft Image List v6.0(SP4) to store the toolbar images.
All Images are bitmaps(*.bmp).

On some machines when I disable a toolbar button:

tbToolBar.Buttons(sButtonName).Enabled = false

the image is not grayed, but it disappears completely and I see a black/dark_grey square in place of the image.

Any Idea what's happenning.

thanks in advance

Toolbar Background Image
Anyone know of a third-party toolbar control that lets you have a background image on the toolbar, a bit like the old Internet Explorer 3.x, the embossed-looking image.

Or better still, how I can get the toolbar control that ships with VB6 SP4 to do it...

Much appreciated

Changing A Toolbar Image.
I want to personalize the toolbar for a project I'm doing but I'm getting the error:

ImageList cannot be modified while another control is bound to it.

I tried to change the name so nothing could be attached to it but it still gave me the same error. How would I make this change?

How To Add Background Image For Toolbar ?
How to add background image for toolbar?

Image List Respective To Image Combo?
Is there Image List respective to Image Combo?
The objective is obvious, to display an icon with every item within the list.

Background Colour Of Toolbar Image
I Want the background of my toolbar images to change in line with the desktop colour settings.

I have a toolbar linked to an imagelist.

I have inserted a gif with a transparent background into the imagelist list, however the image always appears on the toolbar with a white background or inverted.

I have tried changing the backcolor and maskcolor properties of the imagelist, but this appears to do nothing. Any ideas please

Setting Toolbar Image @runtime
How to change the image on a button of the toolbar at run time.


Change Image On Toolbar's Button
Hi all, this is my problem:

I have a Toolbar named Toolbar1. This Toolbar is bound to an image list named ImageList1. ImageList1 has 2 images, one is name "Forward" and the other one named "Approve".

On Toolbar1 I have a button named "Approve". This button's image is bound to ImageList1's "Approve" image. How do I change the button's image to ImageList1's "Forward" image during run time.

Thanks in advance,

Changing The Image On A Button On A Toolbar
In my application I have a toolbar (tbToolbar) with various buttons and I have a condition of when a user selects something, I need one of those buttons (11) to change to a different image (13) in my Image List (ImageList2). What would the code be for that?

I tried this:

tbToolBar.Buttons(11).Image = ImageList2.ListImages(13)

but it said that there was an invalid key...

Thanks for the help

Making Toolbar's Image Larger
Hi everyone!
I made a toolbar including image list.
But buttons in toolbar is too small(16x16).
I'd like to make it larger.
I tried to change Height/Width at the general tab of imagelist's property page but error message is displayed like following.
"Property is read-only if image list contains images"
How can I make a toolbar button larger?
Could anyone let me know?


Drawing/Modifying ToolBar Button Image
Hi All,

can some one tell me the strategy to draw on to a tool bar button image? for example, I have a button for Paint Bucket in the paintbrush like program. When the user chooses a color for paint bucket, button's background changes to selected color. I have the paint Bucket icon inthe Image List. Obviously i can not put one icon for each color in the image list and select it into the button. Any better way?

With regards

Hi all, figured out the way.

1. load the bitmap.
2. select into a new compatibledc.
3. now whatever you want you can draw on to it say lines, boxes, circles etc. here, i am drawing a small 6x6 red square.
4. set the toolbar imagelist property to nothing (otherwise, vb doesn't allow to modify the imagelist control.)
5. then remove the old image from the imagelist control if you want, and add the modified picture to imagelist control
6. set the toolbar imagelist property to imagelist control.
7. set the button's image to the newly added picture.

but is it possible to draw directly on the image in a imagelist or the toolbar button thru' api's ??? any light on that ?

Changing Icons/Image On Toolbar Without Recompiling The Exe
Dear All,

I want to give the facility to user to change the toolbar icons.
Suppose there are ten buttons on toolbar and they have icons/images. Is it possible that user can change the icons/images in the toolbar.

The idea in my mind is to place some images in installation package, so images will be there on the application path. Suppose an image named "one" is used on toolbar and is placed on application path. I want that, if I replace this image "One" with another image and rename its name to image "one", then that image should also change on the toolbar of the application.

Please guide me. How can I do this?

Changing Toolbar's Button Image At Rumtime?
I have looked far and wide but cant get any answers. What is the best way to change a toolbars button image at runtime? Is there any way?

Thanks for any help in advanced

J Stephens

Drawing Lines Using Image Editor Toolbar

I need to draw a line on a windows form in my project using Visual
Basic .Net 2003. My preference would be to use a toolbar rather than
code, if possible. I was able draw lines on forms using Visual Basic
6.0 with no problem but now for some reason the line tools are grayed
out on the Image Editor toolbar in .Net 2003. Does anyone know if it
is possible to do this using a tool bar in Visual Studio .Net 2003 or
will I need to code it instead?
I have been seaching Technet, MSDN, and the Knowledge Base for 2
days and cannot find an answer.


Top Of Form (toolbar??) Image File Ez Question
Hey ppl, i know this is possible and easy to answer but I dont know how. I need to know how to add an image file on the top of a form (where the x button and icon are) [sorry i dont know what its called] I have seen it done in a demo that vbdaman showed me and it looked pretty cool so any help is appreciated. Thanks, Mutate.

If you live and let die then you'll be the only one left. ME rules(and no i'm not talking about me)

Adding To List Of Available Buttons In Toolbar
Hello everyone
Iam looking for a way by which I can add a list of buttons to the "Available list" in customize toolbar option without actually loading it to the toolbar.Microsoft website carrys a solution for this for Windows Common Controls 5.0 but it does not seem to work as expected for Visual basic 6.0 for 32-bit development. Any pointers will be greatly appreciated.Thanks

Toolbar Disabled-list Problem
I've made two image lists for my toolbars.
ilsMenu - normal images
ilsMenuD - for the disabled images.

The problem is the toolbars are refusing to use ilsMenu and are using ilsMenuD for both the normal and disable positions.

When I select ilsMenu from the dropdownbox, ilsMenuD pops back in when the 'Apply' button is hit.

I've made sure that the toolbar and the image lists are the same version
and tried un-registering and re-registering the mscomctl.ocx using regsvr32.
Then tried re-installing SP6.

Still no luck.
Any ideas?

How To Add Dropdown List For A Toolbar Button

how to add dropdown list for a toolbar button. Similar to form button in vb application having a dropdown list.

plz help.


OL2K Assign Custom Image To Toolbar Button
I'm making an addin for Outlook 2000 with VB6 and I've added 1 button to the standard toolbar, but I can't find a way to assign an image (and mask) to it.. I can assign a standard image with FaceID but I want to add my own image with transparency...

The button object does not expose an image or picture or icon property so I'm stuck...

Is that possible?


A Lottle Question, Adding Image To Toolbar Button...
How can I add an image to a toolbar button at run-time?

VB Code:

* The above is the reference to the button with no set image. *

An example may also be helpful


Image Toolbar (Enable/Disable) In Webbrowser Control
Using the WebBrowser Control in VB6.

New to this forum, not new to VB, though i can not for some reason display the image toolbar that appears over images on webpages in my application using the webbrowser control. The toolbar i am refering to is the one that only appears (in the top left corner) when you hover over an image in IE that displays the SaveAs, Print, email and Open Favorites Folder Icons.

I have set the webbrowser's toolbar property to TRUE, but i still do not get the image toolbar. It has been enabled in IE, just to make sure...

Anyone got an ideas?

Load Image To Image List......
I'm throwing together an app real quick and haven't used the imagelist control in a while. I've got my images in my image list control, but I can't remember how to access them.

When an option button is clicked, I need my Image1 control to display a specified image from the imagelist control.

VB Code:
image1.picture = imagelist1.index (1)

I know that's not right, but I can't remember how to specify the index value of the image in the imagelist. Any help is appreciated.

Picture Box Or Image From Image List...
Can I load a pic from an ImageList into a Picture Box or Image control?

What is the best way to package an image into an appication? Am I thinking on the right path?


Word 97 - How Do You Change The Save Icon On The Toolbar From Image To Text?

Quick question. In Word 97, how can I change the save icon from being displayed as an image to being displayed as text.

I know this can be done in design time by going through the customize option, however does anybody know how to do this at run time?

Any advice much appreciated


Image List Problems, Using List Box
Right i have two controls, a list box and an image box. The list box is populated with random values, of which coraspond (spelling???) with the images in the image list, so when i click on the list box i want the correct image to be displayed.

How would i do this?

Thank you in advance

Image List
Quick Question

How do I create an ImageList at runtime?

Dim ImageList1 As ImageList
Set ImageList1 = New ImageList

I thought that would work but it doesn't. Any ideas? Can you load labels and textboxes as well?

Image List
Where files are the like bold image and center images and those types of images located?I am making a toolbar for a notepad.So where can i find them on my hardrive?

Image List
I would like to create an image list (unless there is a faster/better way). That way I can load and display multiple images easily. I do not know how to add and use it?

Image List Help
Hi this is what i want to do, i want to be able to load multiple images into an image list at runtime, ive been researching this and haven't been able to successfully do so.


Help With Image List
First time trying to use an image list...seems like i'm doing everything properly but getting a compile error stating Object Required on the last line

If vForm.Name = "frmChalk" Then
vForm.Controls("img" & curTarget & "P" & i).Visible = True
pic = "Marks" & MINN(Array(ltsPlayer, 3))
vForm.Controls("img" & curTarget & "P" & i).Picture = ImageList1.ListImages.Item(pic).Picture

i created an Image List and left the default name of ImageList1...
i added 3 image files and set the key names to Marks1, Marks2, Marks3...
MINN is a User Defined Function equivalent to Excels MIN function
When this blows up pic=Marks1
Note...Line 2 does execute and the default graphic shows...

Any thoughts?

Copyright 2005-08, All rights reserved