Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Label transparent over picturebox while runtime

$
0
0
This is the code section

 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

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>