how to draw ellipse resizable in .net winforms

Posted by Shanky11 under .NET Framework on 9/30/2013 | Points: 10 | Views : 1984 | Status : [Member] | Replies : 3
private void panel1_MouseMove(object sender, MouseEventArgs e)
{
Cursor.Current = Cursors.Cross;
Graphics g = panel1.CreateGraphics();
Pen p = new Pen(Color.Red);
Rectangle rect = new Rectangle(0, 0, 200, 100);
g.DrawEllipse(p, 50, 50, x, x);
}

private void panel1_MouseDown(object sender, MouseEventArgs e)
{
Point p1 = new Point(e.X, e.Y);
x = p1.X;
y = p1.Y;
panel1.Invalidate();


}
----------------------------
how to this i have done this but by dong this the ellipse is not resizabel
i need resiazble ellipse.




Responses

Posted by: Bandi on: 9/30/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Refer the following link for resizing a control in winforms
http://www.codeproject.com/Articles/20716/Allow-the-User-to-Resize-Controls-at-Runtime
http://www.codeproject.com/Articles/26071/Draw-Over-WinForms-Controls

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Shanky11 on: 9/30/2013 [Member] Starter | Points: 25

Up
0
Down
i am not asking for a control to resize i want to draw a ellipse in winforms
resizable like in paint or photoshop
when we pick circle a circle should draw and we can resize it

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Shanky11 on: 9/30/2013 [Member] Starter | Points: 25

Up
0
Down
http://www.codeproject.com/Articles/26071/Draw-Over-WinForms-Controls
from where can i get GraphicalOverlay compoinrt
how can i include this in my project

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response