Results 1 to 3 of 3

Thread: Transparent label problem ?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2011
    Posts
    467

    Transparent label problem ?

    Hi, just a simple question

    I have a picturebox image for the form and added a label ontop of the image, i have it set the background on the label to transparent but its not transparent :/

    How do i fix this ?

    Thanks

  2. #2
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: Transparent label problem ?

    Transparency for windows forms controls is pretty simple-minded. It normally just shows you the background color or background image of the form. If you want to have another control show through the label, you have to make it the parent of the label. For example, you could put this code in the form's Load sub:

    Code:
    Label1.BackColor = Color.Transparent
    Label1.Parent = PictureBox1
    Label1.Location = Point.Empty
    Note that you have to change the location of the label so that it is relative to the parent instead of to the form. The above example places the label at the picture box's top left corner.

    BB

  3. #3
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    1,023

    Re: Transparent label problem ?

    EDIT: sorry posted in wrong topic (had wrong tab opened, and didn't notice) lol
    Last edited by Justa Lol; Oct 12th, 2011 at 08:23 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width