Results 1 to 40 of 716

Thread: [vb6]Alpha Image Control v2 - Final Update (15 Jan 2012)

Threaded View

  1. #11

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

    Re: [vb6]Alpha Image Control (PNG, AniGIFs, TIFF, & more)

    Quote Originally Posted by Stidor View Post
    ...Update: Ah! Upon further reading of your control source comments, I noticed the comment about loading from the handle instead. So basically I'm now using..

    Set AlphaImgCtl.Picture = LoadPictureGDIplus(PictureBox.Picture.Handle)
    Glad you figured it out, some notes for clarification only

    1) You can't do: Set AlphaImgCtl1.Picture = Picturebox1.Picture because the Picturebox object's .Picture property is a stdPicture class. The AlphaImgCtl object's .Picture property is a GDIpImage class. A type mismatch error should occur.

    2) You can load a picturebox's picture a couple of ways
    a) by handle as you described
    b) also: Set AlphaImgCtl1.Picture = LoadPictureGDIplus(Picture1.Picture)

    Edited: Note that by handle will fail if the picture is a metafile & transparency lost if transparent GIF. I'd recommend staying with option 2b above as a general rule.
    Last edited by LaVolpe; Nov 18th, 2010 at 10:55 AM.
    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}

Tags for this Thread

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