When a user grabs the border of an object to expand the size or move it I
would like to draw a rectangle to show the growing size or changing position.
The problem is that the MouseDown eevnt is within the active control, while
the line I need to be drawing is outside the control. To make things worse
the line to be drawn may need to "float" over other controls on the page.

If I draw on the canvas of the form the line is behind the visual controls
on top.

Question: How do I draw OVER the top of multiple controls?

Re: Draw over multiple controls by Kevin

Kevin
Thu Sep 20 03:53:41 PDT 2007

Use the System.Windows.Forms.ControlPaint class, which is a utility class
specifically for this sort of thing:

http://msdn2.microsoft.com/en-us/library/system.windows.forms.controlpaint.aspx

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"HaySeed" <HaySeed@discussions.microsoft.com> wrote in message
news:3855747E-26EE-4979-95A0-A6E772ED9F5B@microsoft.com...
> When a user grabs the border of an object to expand the size or move it I
> would like to draw a rectangle to show the growing size or changing
> position.
> The problem is that the MouseDown eevnt is within the active control,
> while
> the line I need to be drawing is outside the control. To make things
> worse
> the line to be drawn may need to "float" over other controls on the page.
>
> If I draw on the canvas of the form the line is behind the visual controls
> on top.
>
> Question: How do I draw OVER the top of multiple controls?
>
>