Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UI with Transparent Background doesn't show the Next Immediate Layer

If we set the background of any UI as transparent, it doesn't show what's beneath that, meaning any UI or containers. Instead, it shows the default background of the Form, the lowermost, that is.

How do I get around this transparency problem?

like image 792
Moon Avatar asked Dec 02 '25 02:12

Moon


1 Answers

This is by design, unfortunately:

http://support.microsoft.com/kb/943454

Transparent controls in WinForms are transparent relative to their parent, not to other controls. Transparency in WinForms is more akin to camouflage than true transparency. A transparent control doesn’t actually let you see the control behind it through the form. It asks its parent to draw its own background on the "transparent" control. This is why a transparent control shows the form behind it, but covers up any other controls.

There is some code in the link that demonstrates a work around.

like image 152
Martin Avatar answered Dec 03 '25 18:12

Martin