By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,395 Members | 2,513 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,395 IT Pros & Developers. It's quick & easy.

Selection rectangle drawing over eveything in its container

P: n/a
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.

--
Philippe Meunier
Programmer
CHCA Computer Systems Inc.
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Philippe Meunier" <pm******@chca.ca> wrote in message
news:uS*************@TK2MSFTNGP11.phx.gbl...
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.

--
Philippe Meunier
Programmer
CHCA Computer Systems Inc.


Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.