C # winforms transparent overlay form

My main form has a horizontal separation container. The upper part contains the object list control found here .

I am using code from the previous C # transparent overlay form.

My problem seems to be related to the presentation of a list of objects. Using the code from the answer above, the transparent form perfectly covers all controls, however, when it falls into the list of objects, it seems to be darker over this particular control.

Splitcontainer overlayed

If I close the transparent overlay and bring the empty panel forward when I open the transparent overlay, it still shows this darker section, as if the object list control were still visible.

Blank panel overlayed

First, I would like to know why this is happening. But I would also like to know how I can fix this so that the overlay is consistent.

  • If you want to test this, I created a simple project to demonstrate the problem here

Repeat what happens ...

  • Drag the container divider a bit and click the "Overlay" button.

  • Close the overlay by clicking on the white panel. Click the Blank Panel button, then click the Overlay button again.

Please note that in the Plexiglass class it takes the panel as a parameter only for this demonstration, in my actual project it takes the main form as a parameter.

EDIT

I changed the color from dark gray to white, and it works great. I don’t know why dark gray was the cause of this problem, but I am pleased with the way it looks white, so I will stick to this.

+7
c # winforms transparent
source share
1 answer

For some reason, the Color.DarkGray BackColor attribute for the transparent form caused a problem. BackColor color change to Color.White fixed.

Thanks to Patrice Gahide for helping me.

0
source share

All Articles