Transparent picturebox-VBForums
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 03:44 AM.

  2. #2
    VBaholic & Loving It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    GetWindowRect()
    Posts
    12,340

    Re: Transparent picturebox

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

    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} {GDI+ Classes/Samples} {Unicode Open/Save Dialog} {Icon Organizer/Extractor}
    {VBA Control Arrays} {XP/Vista 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
    2,441

    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
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.