I'm making a shape editor. When I choose the circle button if I press the mouse button it appears a circle in the form, if I choose the square button it appears a square in the form.

But I have to do an MDI Application with this. When I want to put the OnMouseDown event it doesn't work. When it's only one Normal form it works fine, but when it is a MDI form with its child form it doesn't work.


Could you tell me what is the secret to appear the shapes in the form?


If I do this with a TImage it doesn't work also with MDIform and child.


What OnMouseDown event I have to use, the father of the child?

I already did it with an image control, using Canvas instead of shapes, but my teacher told me that with Shapes works well too.

He told me that maybe the name of the parent form where the shapes have to be it isn't right, but I checked that and it is ok. I don't know what is the trouble?

I already did it with an image control, using Canvas instead of shapes, but my teacher told me that with Shapes works well too.

He told me that maybe the name of the parent form where the shapes have to be it isn't right, but I checked that and it is ok. I don't know what is the trouble?

I ALREADY HAVE THE GREAT SOLUTION!!!! MY TEACHER TOLD ME THAT THE ERROR WAS THAT I HAVE TO PUT THE WORD


this


IN fig->Parent=this;

It was all. This was the big mistake that wasn't allowing me to see the shapes in every child form.


Thanks to my very precious teacher. He is a Ph.D.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.