Solved

Rubberbanding around a control/shape

Posted on 2010-08-19
1
322 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
ID: 33475759
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

770 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