Painting over child controls - VB or C#
Posted on 2004-04-20
How can I get paint-acess over the full client area of a form or control, including over child controls? I'm talking about something like the way VS layout paints selection frames and xor-ed drag frames in front of all the controls in a form or control. You see it especially clearly if you overlap two controls and then select the hindmore of them.
I've tried user draw but always end up drawing behind the child controls. I think it's the masking implicit in the hwnd and I don't think I've found a way to get a context that permits access to the full surface. It's always possible I HAVE gotten one but I'm overlooking some other fatal flaw.
Ultimately I need to be able to show half-transparent rectangles of arbitrary extent that may overlap several controls.