VB.NET 2010
I create a label in the code and place it on the panel (pnlTop) on the Windows Form:
Sometimes the newly created label is placed over another control on the panel and I would like the label to have transparent back color (red line of code) and not the default gray background. But the red line of code is ignored and I still see the gray background of the label.
Is there any way to change the back color of the label to transparent in the code?
Have fun.
---- Andy
I create a label in the code and place it on the panel (pnlTop) on the Windows Form:
Code:
Dim lbl As New Label
With lbl
.Name = "lblNewLabel"
.Text = "Some text here"
Me.pnlTop.Controls.Add(lbl)
.Left = 20
.Top = 50
.AutoSize = True[red]
.BackColor = Color.Transparent [/red]
.BringToFront()
End With
Sometimes the newly created label is placed over another control on the panel and I would like the label to have transparent back color (red line of code) and not the default gray background. But the red line of code is ignored and I still see the gray background of the label.
Is there any way to change the back color of the label to transparent in the code?
Have fun.
---- Andy