简体   繁体   中英

How to make picturebox transparent when it comes above another image

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM