C# Picturebox transparent background doesn't seem to work

前端 未结 6 1708
既然无缘
既然无缘 2020-11-27 06:42

For a project of mine I need images to display with a transparent background. I made some .png images that have a transparent background(to check this I opened them in Photo

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-27 07:39

    It probably works perfectly. You are seeing what's behind the picture box control. Which is the form. Whose BackColor is probably white. You can set the form's BackgroundImage property to be sure, you should see the image through the picture box. Like this:

    enter image description here

    Punching a hole through both the picture box and the form requires a bigger weapon, Form.TransparencyKey

提交回复
热议问题