This is the code section
WHich gives the following result after asigning a value to those variables.
http://i.imgur.com/5bdlsP0.png
But i cant get the label to be transparent over the picturebox.
Thank you all
Function NewMensaje(ByVal Mensage As String, ByVal x As Integer, ByVal y As Integer) As String
Dim pic As New PictureBox
Dim label As New Label
With label
.Name = "Lmensaje"
.BackColor = Color.Transparent
.ForeColor = Color.Black
.Location = New Point(x, y)
.Text = Mensage
.AutoSize = True
End With
Me.Controls.Add(label)
With pic
.Name = "IMensaje1"
.Location = New Point(x, y - 10)
.Image = Image.FromFile(filepath & "\Mensaje.png")
.Width = label.Width
.Height = label.Height + 20
.SizeMode = PictureBoxSizeMode.StretchImage
.BackColor = Color.Transparent
End With
Me.Controls.Add(pic)
End Function
WHich gives the following result after asigning a value to those variables.
http://i.imgur.com/5bdlsP0.png
But i cant get the label to be transparent over the picturebox.
Thank you all