2

I am making an application in C#.NET with Visual Studio 2012.

I have a picture in my background form. I have several picture boxes on it. I used .png images with transparent background but in my form it is not transparent when it comes above another image.

Celeo
  • 5,583
  • 8
  • 39
  • 41
mnorouzi
  • 29
  • 3
  • possible duplicate of [C# Picturebox transparent background doesn't seem to work](http://stackoverflow.com/questions/5522337/c-sharp-picturebox-transparent-background-doesnt-seem-to-work) – Ian Link Apr 21 '15 at 21:24
  • Stacking doesn't work, you see the Parent, not the controls that you overlapped. Don't overlap or layer by using the Paint event instead. – Hans Passant Apr 21 '15 at 21:51

1 Answers1

0

Set your picture box back color property to transparent.

pictureBoxTest.BackColor = Color.Transparent;

To further explain, an image with a transparent background will inherit the picture box's background color. You need to set the color to transparent as well to ensure it truly is.

Black Frog
  • 11,595
  • 1
  • 35
  • 66
Ian Link
  • 287
  • 2
  • 13
  • I didn't mark the doe vote, but an answer saying something duplicate is not a quality answer. You need to vote to close the question as duplicate. – Black Frog Apr 21 '15 at 22:30
  • @BlackFrog, thank you. I am very new so I wrote the answer and mentioned the duplicate. I then read how to correctly mark the duplicate post and flagged it too. I guess I should have edited the answer to remove the duplicate to people didn't downvote. Live and learn I guess. – Ian Link Apr 22 '15 at 02:21