#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    33
    Rep Power
    12

    How to make a GIF inside a picturebox transparent


    How to make a GIF inside a picturebox transparent

    Does anyone knows how to make an animated GIF inside a picturebox transparent, so the background of the form can be seen?

    Thanks

    Andy
  2. #2
  3. Sk8er Punk!
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Location
    Minneapolis, MN
    Posts
    96
    Rep Power
    11
    The image software has to make the GIF transparent. You need to ask someone who has experience using whatever image software you use. I use Paint Shop Pro and PhotoShop.
    if (Bush == "idiot") return "Bush is an Idiot";
    else if (Bush != "idiot") return "Bush is still an idiot";

    http://www.yourpolitics.org
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Brisbane, Australia
    Posts
    50
    Rep Power
    11
    I never use picture box so correct me if I'm wrong.

    I don't think picture box will let you place an image with another background inside picture box. so you cannot get your GIF transparent to work with in a picture box.

    what about make the picture box transparent?
    well yes, you can do that by making your form transparent, however your image will go completely transparent with your picture box, so this way won't work again.

    Ok, than, how to make transparent effet?
    actually it is easy. write your own picture box control using GDI+ or do not use picture box, just draw it on the form using GDI+ (paint event)
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    33
    Rep Power
    12
    manual63:


    I used Animation Shop 3 to design the GIF with a Transparent background, the problem is that when you place it into a picturebox, for some reason the animation plays with a white background.

    I try the code below and it did indee made the background Transparent but unfortunately the animation will not run.

    Anyone has a suggestion?

    Dim b As Bitmap = PictureBox1.Image 'create a bitmap object
    b.MakeTransparent(color you want transparent) 'set a color transparent
    PictureBox1.Image = b 'reassign modified picture to the pixbox

IMN logo majestic logo threadwatch logo seochat tools logo