Image List won't accept images (.icos)

  • Thread starter Thread starter Bruce L. Scheffler
  • Start date Start date
B

Bruce L. Scheffler

I am trying to create an image list and add several icons
to use on my toolbar; however whenever I try to add an
icon I get a "Invalid Parameter" error... what is the
secret?
 
I am trying to create an image list and add several icons
to use on my toolbar; however whenever I try to add an
icon I get a "Invalid Parameter" error... what is the
secret?

Image lists is only for BMP, PNG and such formats - not for .ICO,
sorry.

Marc
================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
I am trying to create an image list and add several icons
to use on my toolbar; however whenever I try to add an
icon I get a "Invalid Parameter" error... what is the
secret?

I think you can only add bmp/jpg or something like that. Or it could be
that the icons do not support the 16x16 size? or too many/to few colors?
just thoughts really. hope it gives you something to munch on :)
 
You certainly can add an Icon to an ImageList.Images -- the method is
ImageCollection.Add(Icon).

I assume you're getting an ArgumentException. I'd check the icon you're
trying to add isn't a null reference. If it's not, then give us a code
sample and we can look into it.

I'm guessing here, but you're not loading the icon from a resource are you?
Resource methods often return null if they can't find the requested item.
 
You certainly can add an Icon to an ImageList.Images -- the method is
ImageCollection.Add(Icon).

Thanks - I stand corrected. You can indeed add icons (*.ico files) to
an image list. Thanks for clarifying this!!

Marc

================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
Back
Top