Results 1 to 5 of 5

Thread: Transparent picturebox

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2011
    Location
    Finland
    Posts
    36

    Transparent picturebox

    how can I make picturebox where background would be transparent? for transparent .PNG image?

    Thanks!
    Last edited by Hece; Feb 19th, 2012 at 04:44 AM.

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Transparent picturebox

    Which programming language, and version, are you using?
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2011
    Location
    Finland
    Posts
    36

    Re: Transparent picturebox

    Visual Basic Express Edition 2008

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

    Re: Transparent picturebox

    Just set the picture box's BackColor to Color.Transparent. You can do it in the designer or in code. Then you can put your transparent PNG in the BackgroundImage or the Image of the picture box.

    But remember, transparency in Windows Forms is a bit limited. You can only see through to the parent of the picture box, which is normally the form. So if you put a transparent picture box on top of a button, for example, the button will not show. What you can see through the transparent parts is the form's BackColor and/or its BackgroundImage.

    BB

  5. #5

    Thread Starter
    Member
    Join Date
    Nov 2011
    Location
    Finland
    Posts
    36

    Re: Transparent picturebox

    ah, okay. Thanks!

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