Image Button Problem: "SetPixel is not supported for images with indexed pixel format

anilgupte

Member
Joined
Mar 7, 2007
Messages
11
Programming Experience
1-3
Image Button Problem: "SetPixel is not supported for images with indexed pixel format

I am using an Image Button from Microsoft's Power Pack. When I use the
.Enabled=True/False I get the following error
"SetPixel is not supported for images with indexed pixel formats"

I am using GIF images, because as far as I could tell JPG did not work.
Should I be using any other format? Anyway around this error?

Thanx.
 
Like the error says, you can't really make changes using Graphics to an image in an index file format (GIF). As I just mentioned in another post, you can try using PNGs if you're trying to work with transparency.
 
Setpixel cntinued

But I am not really trying to make any changes to the image. All I am trying to do is enable and disable the control. Perhaps VB itself is changing the image (by greying it when disabled).

What is the point of an Image Button if it cannot be enabled/disabled?

Anil
 
Back
Top