C#. Remove the background from the image

I'm writing a program in C#. For this program, I drew a picture and cut out its background. However, when you open it via PictureBox, it has a white background.
Question: is there any way to get around this and remove the white background so as not to spoil the program? Thank you in advance!

3 answers

In order for the background to be absent in the PictureBox, the image must be without a background, for example, in PNG format, i.e. the image loaded into it must be with an alpha channel, in which the transparency for the background is set. More specifically, the image format should be argb, 32 bits per pixel.

Here is a screenshot from my project, where a PNG image with transparency is loaded in PictureBox, and it is supported immediately, I did not even configure anything. Basic properties too shown.

enter a description of the image here

Accordingly, at the development stage and at launch, it looks like this: enter a description of the image here

 2
Author: BlackWitcher, 2016-11-22 06:09:51

Everything is so, only there should be a property BackColor: Transparent enter a description of the image here

This is the whole solution to the problem.

 0
Author: Vadim Romanko, 2020-06-06 17:02:12

Your background matches the shape, that's all. If you put the picture above another background, you can see that it is not lost

 -1
Author: Genry, 2017-03-09 14:45:17