If we set panel.BackColor = Color.Transparent;
panel becomes transparent and shows parent background color or image. But PictureBox
is not container you only place panel on picture box so even if you try panel.BackColor = Color.Transparent;
you will not see image of PictureBox
. You will try something like this.
panel.Parent = pictureBox;
panel.BackColor = Color.Transparent;
But take care top and left of panel
because when you set pictureBox
as parent. you will also need to set top and left of panel
.