If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

child form controls

How to do the below work in C++ ?
main form is: Form1.
child forms are: home and createConf.
Form1 is the Parent MDI.(Main Form/Window)
I am viewing home.
there is a button in home and it is: crtConfBtn
When I click on that crtConfBtn, application should open the child form, createConf, in the Form1. At the same time, the child form, home should be hide or close.
That is clicking crtConfBtn should replace createConf with home.
In other words, home should be override by the createConf.
Please anyone know how to do that?

Edit: I am using Visual C++ for this project and used windows forms to create forms.

Re: child form controls

I don't really understand your description of your scenario, but as a general design guideline, have the MDI parent form do all the management of the child forms. If you want a child form to trigger an action that affects other child forms, do that by calling a method you wrote in your MDI parent form class, that then carries out the desired actions. You gain access to the MDI parent from the MDI child forms via their MdiParent property. As you're going to call custom methods of your class that are not part of the standard .NET Form class, you'll need to cast the value of the property to the type of your MDI parent class in order to do so (use safe_cast).

It's not imposible to have your MDI child forms interact directly with each other, but that's likely to lead to a bad program design which may quickly become really hard to understand and maintain.

I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.