Link to home
Start Free TrialLog in
Avatar of ANINDYA
ANINDYAFlag for India

asked on

How to open the child form inside the parent form in windows form

Experts
My question is that when I click a menu item then a new window opens by virtue of the following code

Form2  f2=new Form2();
f2.show();

Actually this opens the new and separate form.
I want the form should be inside the parent form .That is the new form should not open separately rather it should appear that the new form is embedded in the main parent form. Please see the image attached .

I  do not know the exactly technical term to describe what I want .

so please see the image to understand my query.
Provide me some tutorials or urls or code to implement the actions of the image.
Thanking you


query.JPG
Avatar of Tribmos
Tribmos
Flag of United States of America image

With what you describe there what you want is instead of a "Form" have it be a custom control.

What happens is on that "panel" you create and add this custom control during runtime.

Basically its treated very similar to a form (design) but its treated like a control (button, text box, etc etc) but lacks the title bar and other independent features that a form has.
ASKER CERTIFIED SOLUTION
Avatar of Tribmos
Tribmos
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ANINDYA

ASKER

Experts if possible please provide me some more urls on the custom control.
Thanks for the suggestions