Creating a truly transparent control

G

Guest

Hi,
I found this online:
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x00000020; //WS_EX_TRANSPARENT
return cp;
}
}
so I created a new class (called TransparentControl), put the above in it,
then on my normal form I made the label private TransparentControl label7;
and changed the appropriate line in InitializeComponent() this.label7 = new
HCAUT.TransparentControl();. I also made the backcolor of the label
Transparent. But when I run everything, the label's backcolor still isn't
transparent. Does anyone know what I'm doing wrong?
Thanks so much!
Mel
 

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