Memory problems loading pictures into image list

I am having problems inserting pictures into my image list for use on buttons in the toolbar. First of all the images were not showing on the buttons when I referenced the image list in the customise toolbar dialog box and now when I try to insert a pictures its telling me I am "Out of Memory"

Any ideas?

Gavin

Gavin_StaffordAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mmusanteCommented:
I had similar problems ... try using your images as resources (with the resource editor) instead of using image-list

If you use your images in several forms you can try unloading them when the form is not active (working with the from activate deactivate events)
0
Gavin_StaffordAuthor Commented:
Thank you for the quick response. Could you just explain how to use the resource editor I am from the UK and I'm a bit thick

Gavin
0
mmusanteCommented:
Resource editor is a VB Add-In you can simply activate it from the add-In Menu (sorry but I use a localized version of VB so I can't give you the full english-menu path). Once activated you can add images in Resouce editor simply clicking in the 'bitmap' icon, every picture you add will have a id number

To use resources images use this code ...

Set cmdCommand.Picture = LoadResPicture(104, vbResBitmap)
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

mmusanteCommented:
Sorry but I verified just now that the toolbar control seems only work with Imagelist (the button object only accept the Imagelist key as property and not a picture object) so if you want use this control you'll need e different solution ...
0
Gavin_StaffordAuthor Commented:
Thanks for your help this far. I'lluse resource file for my other pics.

Anyone got any other ideas?
0
zzzzzoocCommented:
>>when I referenced the image list in the customise toolbar dialog box
When you configure your buttons, you also have to select the image's index to use for a partilcular button.

>>its telling me I am "Out of Memory"
If the problem still occurs when you restart Windows or VB, try updating to the latest (6.0 is fine).
0
Gavin_StaffordAuthor Commented:
Thank you.

I'll try the first part

But I'm allready running VB 6 so I'm a bit confused.
0
zzzzzoocCommented:
Oh, I meant the version of the control (MS Common Controls 6.0). Do you have this problem with every type of image? It could just be the images you're trying to use.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gavin_StaffordAuthor Commented:
Dear zzzooocc

It worked

I was using version 5 of common controls. I changed to six and it worked

If you were here I would hug you

Gavin
0
zzzzzoocCommented:
:)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.