when label1.BackColor = ColorTransparent, the whole label becomes transparent and the text disappears

71 Views Asked by At

When I try to change the background color of a label, the whole label becomes transparent. Therefore the code works, but not in the way I actually need it to work. I need the text (ForeColor) to be a particular color, hence when the label is put over the pictureBox1, the text is only visible.

label1.Parent = pictureBox1;
        label1.BackColor = Color.Transparent;
        this.label1.ForeColor = Color.FromArgb(18, 148, 229);

before inputting the code

after inputting the code

0

There are 0 best solutions below