Solved

Rubberbanding around a control/shape

Posted on 2010-08-19
1
318 Views
Last Modified: 2013-12-17
I am creating an application in c#.NET 3.5 similar to Microsoft Power point.
I am having provisions to draw shapes and place controls in a page.
When user selects multiple pages, I need to show that the controls and shapes in the page are selected with a rubber band drawn around them.
Based on the selection, I would need to have the same functionalities of a selected control / shape such as resizing, moving, deleting etc.
Please let me know what I should do in the code to show that a control or a shape is 'selected' in the page.
0
Comment
Question by:B_SIVARAMAKRISHNAN
1 Comment
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
Comment Utility
You have three basic options:
(1) Increase the size of the control when it is selected so that the rubberband is drawn within the bounds of the control but appear to the user to be outside of it.
(2) Draw the rubberband directly to the screen with ControlPaint.DrawReversibleFrame().  This will allow you to draw outside of the bounds of the control but it may get erased when other controls/windows obscure the rubberband.
(3) Make the container of the controls draw the rubberbands instead.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now