How to make a control derived from TCustomControl transparent

I have a custom control which inherits TCustomControl. On this control there is a TShape, TImage and a TLabel control.
All of the controls added, I can make transparent, but does anyone know how I could make the TCustomControl transparent?

Thanks!
LVL 2
Balder1978Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

andrewjbCommented:
You can do it with TGraphicControl simply by not drawing in a region.

However, TCustomControl is a "proper" windows control with a windows handle. So it's harder.

I can't find my example at the moment. But, roughtly speaking, you have to create regions that cover the apporpriate bits you want to draw on, then use SetWindowRgn(..) API call to tell windows that it's an odd-shaped window.

This doesn't work on all windows versions, but I think it's OK on WIN95+
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Balder1978Author Commented:
Thanks for the info.
 I'm pretty nww at this, so if you have any example code, please let me know.
But I'll fiddle with it for a couple of hours ;)

Thanks!
0
Balder1978Author Commented:
The only thing I needed to do was to set Canvas.Brush.Style to bsClear.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.