7

My main form has a horizontal splitcontainer on it. The top portion contains an Object List View control found here.

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

My issue seems to have something to do with the Object List View. Using the code from the answer above, the transparent form covers all controls perfectly, however when it gets to the Object List View it seems to draw darker over this specific control.

Splitcontainer overlayed

If I close the transparent overlay and bring a blank panel to the front, when I open the transparent overlay, it still shows this darker section as if the object list view control is still visible.

Blank panel overlayed

I would first like to know why this is happening. But I would also like to know how I can fix this so that the overlay is consistant.

  • In case you wish to test this I created a simple project to demonstrate the issue here

To replicate what happens...

  1. Drag the splitcontainer down a little and click the Overlay button.

  2. Close the overlay by clicking in the White Panel. Click the Blank Panel button then click the Overlay button again.

Please note that in the Plexiglass class, it is taking a panel as a parameter only for the sake of 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 perfectly. I am not sure why the dark gray was causing that issue, but I am pleased with the way it looks with white so I will stick with that.

Community
  • 1
  • 1
Jeff Click
  • 889
  • 9
  • 20
  • 1
    Looks almost as if that 3rd pary control is creating a screenshot at its location to create a buffer for when it needs to repaint – C.Evenhuis Oct 16 '14 at 13:49
  • 3
    The control uses the same trick, GlassPanelForm class. The combination probably bites. – Hans Passant Oct 16 '14 at 13:59
  • @Hans Passant Any ideas for how I can fix this? – Jeff Click Oct 16 '14 at 14:01
  • 6
    You are not asking this question the Smart Way, there's nothing I can do with a screenshot and me guessing what your code looks like gives me way too few odds to repro the problem. Create a minimum repro project, something that SO users can easily copy or download. You have to do the legwork first. – Hans Passant Oct 16 '14 at 14:05
  • 1
    Solution could be to use WPF instead :) – Charleh Oct 16 '14 at 14:08
  • @HansPassant I created a small project, it can be downloaded [here](http://www42.zippyshare.com/v/40953536/file.html). – Jeff Click Oct 16 '14 at 15:27
  • I can't seem to reproduce the problem with the indications you gave... Everything seems to work just fine on my machine. – Patrice Gahide Oct 16 '14 at 15:44
  • @PatriceGahide thanks for taking a look. I assume you tried the example project? Did you try dragging the split container down before clicking the Overlay button? – Jeff Click Oct 16 '14 at 15:47
  • Yes I think I did just as you said. Complete obedience. Always. That's me. – Patrice Gahide Oct 16 '14 at 15:49
  • I wonder what could be causing this sort of behavior on my machine then. Very strange... – Jeff Click Oct 16 '14 at 15:52
  • Wow, when you move the form while the transparency thing is doing its thing, the border moves but not the content. You have a lot of work to come with this stuff! – Patrice Gahide Oct 16 '14 at 15:54
  • 2
    Anyway, maybe the graphic driver or something? You could try on some clean virtual machines to see if it is system or framework related. – Patrice Gahide Oct 16 '14 at 15:58
  • That's because the two methods that move the overlay no longer work when I pass it a panel instead of a form. (It was designed to accept a form parameter, not a panel) In the project I am using it in, that functionality works great. Thanks to @HansPassant. :) – Jeff Click Oct 16 '14 at 16:02
  • I will give a different machine a go. – Jeff Click Oct 16 '14 at 16:03
  • 1
    Update: previous (working) test on W8. New (failing) test on W7. Both have .NET 4.5 installed. – Patrice Gahide Oct 16 '14 at 16:07
  • Wow. That sounds like very bad news for me. – Jeff Click Oct 16 '14 at 16:11

1 Answers1

0

For some reason, the Color.DarkGray BackColor attribute for the transparent form was causing the issue. Changing the BackColor to Color.White fixed this.

Thanks to Patrice Gahide for helping me.

Community
  • 1
  • 1
Jeff Click
  • 889
  • 9
  • 20