Something you could try is writing a little program to load all your button
GIF files, doing the MakeTransparent thing and then saving them back out as
PNG files, and then loading them in via the designer.
I don't know if that would actually work by the way, I'm just hypothesizing
that it might - I'd try it with one file on its own first... Something like
this:
Bitmap bmp = new Bitmap("MyGifFile.gif");
bmp.MakeTransparent(Color.White);
bmp.Save("MyFile.png", Imageformat.Png);
See if loading that PNG file in with the designer now works as intended.
(I'm suggesting this because PNG supports a full alpha channel.)
If that seems to work, then just convert all the GIFs to PNGs using code
like the above as a once-off process, and then use the PNGs as the things
you load into the designer.
--
Ian Griffiths -
http://www.interact-sw.co.uk/iangblog/
DevelopMentor -
http://www.develop.com/
"Adine" wrote:
I meant via designer. because if I have 20 buttons on the form, then I need
to add 20 x 3 lines in the program. that would be nice if VS had a property
beside image property to set the transparency.