PictureBox Transparency with GIF doesn't work on the fly

  • Thread starter Thread starter Sowen Zhang
  • Start date Start date
S

Sowen Zhang

Hi,

I am having a gif animation, when I place a picture box on the form, and
load the gif to it.

The transparency works fine.

But if I create a picturebox on the fly, and load the gif to it, the
transparency doesn't work. Even I set the backcolor to transparent, that
didn't help.

Any clue? Thanks a lot!



--
Best Regards!
Hong.
---------------------------
Image Processing and Watermark components for .NET
http://www.ImageComponent.NET

Personal Entertainment Shareware and Freeware
http://www.angGoGo.com
 
Sowen Zhang said:
I am having a gif animation, when I place a picture box on the form, and
load the gif to it.

The transparency works fine.

But if I create a picturebox on the fly, and load the gif to it, the
transparency doesn't work. Even I set the backcolor to transparent, that
didn't help.

I suggest to post the code you are using to load the GIF file and create the
picturebox control.
 
Hi,

Thanks for your reply.

But truely, those are really simple code. Just create a new instance, then
load an image file, and add to the control collection.

If the background is a color, then even I create a picture on the fly, the
transparency still works.
If the background is another image, then it doesn't work.
If I load a background image to the form, then place a picture box with an
image, the transparency works fine.

Is this a bug of PictureBox?


Best Regards!
Hong.
 
Back
Top