A1VBCode Forums

Transparent Image in a Transparent ActiveX Control


By DanTheMan - 7/28/2010

Hi folks.  This is my first post here, and since I'm new to vb, I'm sure I'll be checking back here a good bit in the future.

I need to create some activex controls with transparent backgrounds.  These controls contain non-sqare transparent gifs.  The issue is that eventhough transparency is enabled in the project, the gifs still have a gray square around them when I insert the OLE object into my externa application. 

So what I've tried is:

  1. Create a new "ActiveX Control" project
  2. Set the "BackStyle" property to 0-Transparent
  3. Double click "Image" on the toolbar
  4. Set the "Picture" property to load my gif image (I can tell this is loading with proper transparency as I can see other elemnts behind it)

So I do all of this and there is a gray box around the extents of my image rather than it being transparent.

I have found an .ocx called transimg that seems to work, but since it isn't open source, I don't know how they did it.

Any clues?