?
Solved

Transparent UserControls

Posted on 2006-11-08
9
Medium Priority
?
220 Views
Last Modified: 2010-04-23
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
Comment
Question by:PLavelle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
9 Comments
 
LVL 10

Expert Comment

by:Kinger247
ID: 17897890
Are you asking form something more than just :

Control.BackColor = Color.Transparent

???
0
 

Author Comment

by:PLavelle
ID: 17897917
A transparent UserControl. Setting its backcolor to transparent doesn't work.
0
 
LVL 10

Expert Comment

by:Kinger247
ID: 17898111
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 34

Expert Comment

by:Sancler
ID: 17898302
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
 
LVL 10

Expert Comment

by:Kinger247
ID: 17898351
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
 
LVL 10

Expert Comment

by:Kinger247
ID: 17898359
The reason why I ask is that I've created similar projects recently and have had to use smoke and mirrors.
0
 

Author Comment

by:PLavelle
ID: 17899039
Yes exactly, moving controls in a designer.
0
 
LVL 10

Accepted Solution

by:
Kinger247 earned 2000 total points
ID: 17899079
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
 
LVL 10

Expert Comment

by:Kinger247
ID: 17921940
Hi, did this work for you ?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month7 days, 21 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question