Selection rectangle drawing over eveything in its container

  • Thread starter Thread starter Philippe Meunier
  • Start date Start date
P

Philippe Meunier

Hi,

I would like to know How I could draw a Dashed rectangle over everything in
a container. I will use this to draw a selection rectangle (like in VB.NET
Form Designer UI). And even it draws in invert colors I think, but this is
not necessary for now.

Can I do this with a usercontrol ? Because I know that transparency is a
little tricky in VB.NET, for usercontrols.
 
Hi,

As far as I remember the Graphics class can be created for a control.
Therefore, you should capture the mouse, create the Graphics instance, react
to mouse events and re-draw the selection rectangle accordingly, and then
release the mouse and dispose the Graphics.

Just a suggestion though.
 
Back
Top