• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 235
  • Last Modified:

Transparent UserControls

I need to build a transparent control that has a true transparent background. We are building our own designer to hold controls and it seems like a very daunting task to paint the control's backcolor based upon any number of controls that could be underneath it. Is there any way to make this work?
0
PLavelle
Asked:
PLavelle
  • 6
  • 2
1 Solution
 
Kinger247Commented:
Are you asking form something more than just :

Control.BackColor = Color.Transparent

???
0
 
PLavelleAuthor Commented:
A transparent UserControl. Setting its backcolor to transparent doesn't work.
0
 
Kinger247Commented:
Seems to work for me ?

I just created a new project with a form and usercontrol. I set the backgound of the usercontrol to transparent.
added the usercontrol to the form and it was transparent ?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
SanclerCommented:
For me, it is transparent so far as the FORM itself is concerned, but not with respect to any controls placed on the form that are behind the usercontrol.  In my test, I was able to get the "hidden" controls to show by using .SendToBack on the usercontrol.  I don't know if that would be sufficient for your purposes.

Roger
0
 
Kinger247Commented:
Ok, I see what your doing now.
Your right a transparent control will not show whats actually underneath it.

why do you need this ?  are you moving controls in a designer ?
0
 
Kinger247Commented:
The reason why I ask is that I've created similar projects recently and have had to use smoke and mirrors.
0
 
PLavelleAuthor Commented:
Yes exactly, moving controls in a designer.
0
 
Kinger247Commented:
And you want them invisible as you move them ?

If this is the case, what I've done is used gdi to draw around the control you would be moving, then hide the the control and only drag the line via gdi.
A bit like dragging a form in windows, when all your seeing is a box where the window should be.
Then make the control visible again at the new location onmouseup event.
0
 
Kinger247Commented:
Hi, did this work for you ?
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 6
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now