It is a C# and Windows Form project.
Using the immediate example from Visual Studio's own user interface:
- When a panel is resizing, there is a transparent strip showing the prospective panel size showing over all other controls.
- When a dockable panel is moved, a transparent docking guide will show up over the prospective docking space.
I am trying to implement the drawing like this, but without success:
Failed method one: override OnPaint() of the form, the problem is OnPaint happens before any controls are drawn, so the graphics are always behind any all controls. (I wish there is an AfterPaint())
Failed method two: Create graphics from Desktop DC. I can finally draw something over other Controls, but the graphics aren't transparent.
Really appreciated if you have any comments!