Runtime control resizing

G

Guest

I have an application where I need to allow runtime resizing and moving of controls. Does the .Net framework provide any facility for performing this feature or do I need to develop my own? I can use the drag/drop functionality to move the control. To perform the resizing would be more complex - possibly use GDI+ to draw a rectangle around the control, and then provide handles to change the size of the rectangle. Are there any code samples or technical guidelines to performing this feature in C#. I have seen some code samples for C++, but I would prefer to use C#.
 
H

Herfried K. Wagner [MVP]

* =?Utf-8?B?amJtZWVo?= said:
I have an application where I need to allow runtime resizing and
moving of controls. Does the .Net framework provide any facility for
performing this feature or do I need to develop my own? I can use the
drag/drop functionality to move the control. To perform the resizing
would be more complex - possibly use GDI+ to draw a rectangle around the
control, and then provide handles to change the size of the
rectangle. Are there any code samples or technical guidelines to
performing this feature in C#. I have seen some code samples for C++,
but I would prefer to use C#.

Have a look at the implementation of SharpDevelop's form editor:

<http://www.icsharpcode.net/OpenSource/SD/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top