|
-
Nov 18th, 2010, 09:59 AM
#11
Re: [vb6]Alpha Image Control (PNG, AniGIFs, TIFF, & more)
 Originally Posted by Stidor
...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.
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|