needs advise

How to ensure that the shape selected(mayb using a button with the specified shape name) is added/drawn on the custom control AND that the shape can be treated individually. For example, only the selected shape can be resize.
Please note that, there can be more than one shape that can be added into in the custom control by using the button.

thanks
[363 byte] By [cyn8] at [2007-11-20 9:33:02]
# 1 Re: needs advise
You should create some base class called Shape, and then create your custom derived classes (for example square, circle, star, etc).

Then, internally, you keep a List<Shape> class with all the shapes. Since you know the position of the shape (and maybe even the z-index if you store this one as well), you can use the MouseClick event to check which shape the user selected.
Tischnoetentoet at 2007-11-9 11:34:25 >
# 2 Re: needs advise
Then, internally, you keep a List<Shape> class with all the shapes.
Can you explain more about that? It will be really helpful. thanks
cyn8 at 2007-11-9 11:35:25 >
# 3 Re: needs advise
This looks like some homework question. If it is, show us what you already have. There are tons of examples like this on the internet.
Tischnoetentoet at 2007-11-9 11:36:24 >