ImageList problems

  • Thread starter Thread starter carmen
  • Start date Start date
C

carmen

I cann't manage an ImageList. I get an exception when images are more than
20 pixels.
Could you help me?
Carmen
 
Hi Carmen,
I cann't manage an ImageList. I get an exception when images are more than
20 pixels.

Try giving us some more info, e.g. what's the exact exception you get,
at what point do you get the exception (runtime? design-time?), ...


Regards,

Elisa
 
This is the error that I get at runtime:

Excepción no controlada del tipo 'System.ArgumentException' en
System.Drawing.dll

Información adicional: ArgumentException

(Not controlled exception ...)

Thank you.
 
Hi Carmen,
Excepción no controlada del tipo 'System.ArgumentException' en
System.Drawing.dll

Información adicional: ArgumentException

A System.ArgumentException usually means that some value you specified
is not correct. In your original message you write "when images are more
than 20 pixels". You do know that the image size parameter for an
ImageList needs two values? You need to specify the width and the height
of the images in your ImageList, for example "20, 20", meaning each
image will be 20 pixels high, and 20 pixels width.

Hope this helps, otherwise, give us some more details, or the lines of
code that throw the ArgumentException.


Regards,

Elisa
 
I found the problem, it was in the bitmap format of the bmp image files. I
copied and pasted from Paint to another graphic program and it worked.
Thanks for your time
Carmen
 
Back
Top