lundi 9 mars 2015

How to add Control over GraphicsPath

I haved drawn a round Rectangle using OnPaint event:



protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);

GraphicsPath path = RoundedRectangle.Create(5, 5, 20, 20);
e.Graphics.DrawPath(Pens.Black, path);
}


and i want to draw a control over that rectangle . e.g: a TextBox


Question: Is there a way to know the Location or the Point of GraphicsPath to set my control over it?


Aucun commentaire:

Enregistrer un commentaire