You have to program the whole system for doing so, using just one control. It could be a custom control, or, say,
Panel
.
The word "shapes" (not "shape") makes it a pretty complex thing. You would need to develop the type hierarchy, rendering, all those graphical elements showing the shape's extents, to change the shape by selecting a small rectangular marker and moving it (or something like that).
But the base of it is pretty simple. You should put all graphical data in some data model. You need to have rendering of this model onto the rendered control either by overriding its method
OnPaint
or handling its event
Paint
. You should use the instance of the
System.Drawing.Graphics
passed to you in these methods' parameter (it's a usual mistake of the beginners to create the
Paint
instance, which would be wrong in this case). And, to do any move or transformation, you need to use
Control.Invalidate
, to trigger the redrawing.
Please see my past answers for further detail:
What kind of playful method is Paint? (DataGridViewImageCell.Paint(...))[
^],
capture the drawing on a panel[
^],
Drawing Lines between mdi child forms[
^].
—SA