Transparency problem with DisplayFromStdPicture

Discussions about document viewing.
Post Reply
Posts: 4
Joined: Tue Aug 07, 2007 6:25 pm

Transparency problem with DisplayFromStdPicture

Post by bitoboy » Wed Aug 15, 2007 9:04 pm

Please help.

I am using VB6 and an ImageList object to contain some GIF files with transparency. I used the DisplayFromStdPicture method to load from the imagelist to the GDViewer object. However, the transparency is not being respected. Instead, the original transparent color of that GIF file is being shown.

Please assist.


User avatar
Site Admin
Posts: 5592
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Post by Loïc » Tue Aug 21, 2007 10:33 am


This behaviour come from a gdi+ methods which can't get the original color depth of a Picture object coming from a vb6 control...

However, you can use a vb6 function to save the your picture object to a temporary image file:

Code: Select all

Call SavePicture(Image1.Picture, "c:\temp\tmp.gif")
After, you have just to load the saved image using the DisplayFromFile() methods.

Best regards,


Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest