Reputation: 314
I want to draw a rectangle with the resize points for the selected control as shown in the image below.
I made use of the paint event of the control and i was able to draw a border rectangle for the selected control.
Rectangle borderRectangle = new Rectangle(0, 0, this.Width, this.Height);
ControlPaint.DrawBorder(e.Graphics, borderRectangle, Color.Black,System.Windows.Forms.ButtonBorderStyle.Dotted);
Do we have any option to include the functionality as we have in the windows forms designer?
Please do suggest me a method for the same.
Thanks in Advance,
K
Upvotes: 1
Views: 3614
Reputation: 26434
Here is a custom implementation to have resizable controls on codeproject:
Allow the User to Resize Controls at Runtime
And here is some official information on how to build a full-fledged form designer in .NET:
Tailor Your Application by Building a Custom Forms Designer with .NET
Upvotes: 1