Transperancy

G

Guest

I am having trouble understanding how to code to get a control to have a
transparent background in VB6

I have a .PNG file with the a pretty foreground image and a background as an
alpha channel. I am trying to use this either as a picture box or as a
label. I can set the background color nicely to any shade in the chart, but
transparent does not work.
I need to have the foreground 100% OPAQUE AND THE BACKGROUND 100%
transparent.
I can recolor the alpha channel to any color needed to specify transparent
with Photoshop.

I do not need to manipulate transparency during the execution, just need to
turn image visible or not and move it around.
I have found several Google references, but the code always results in "this
control not allowed transparency"

where do these lines of code go?

SetStyle(Control.SupportsTransparentBackColor, True)
Me.BackColor = Color.Transparent
Form1.TransparencyKey(System.Drawing.Color.Transparent)
The instructions are very vague.

suggestions??
 
C

Cor Ligthert

Joisey,

Not the most simple question mostly. This is a VBNet newsgroup and your
question will probably have a very different solution in VB6.

I advice you to ask this question in the newsgroup.

microsoft.public.vb.general.discussion

I hope you find your answer soon

Cor
 
G

Guest

Sorry for TYPO (late at night)

Definitely using Visual Basic.Net 2002 standard edition......
joisey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top