Search code examples
c#winformsgifpictureboxtransparent

Transparent animated gif picture show above another picture


I want to show a transparent animated gif picture above another picture in a WinForm.
But the problem is animated gif image is not transparent & has a white background.
How can i make that animated gif transparent?


Here is my animated gif (It has a transparent background):

animated gif

And here is my orange picture :

orange picture

And here is my winform after load :

Transparent animated gif picture above another picture

As you see Loading... image has white background.
How can i transparent it?


**THIS IS NOT DUPLICATE, THE ANSWER [HERE][4] DID N'T SOLVE MY PROBLEM.** **PLEASE TEST MY ANIMATED GIF & YOU WILL SEE WHAT AM I SAYING!**

Solution

  • Actually the answer from here works You have to set the gif-picturebox above the other one (as child) and set it's BackColor to Transparent

    imgBackImage.Controls.Add(imgGifImage);
    imgGifImage.BackColor = Color.Transparent;
    

    The first line of these codes is the key.

    image