Click here to Skip to main content
15,902,299 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
How to host a form inside a form?
I am working on c# so can you help?
Posted
Updated 10-Apr-10 3:09am
v3

Just instantiate the child form like you would any other object:

MyForm form = new MyForm();
form.ShowDlg();


[EDIT - Removed unclosed bold tag which was making rest of the page bold]
 
Share this answer
 
v2
You could also run the new form as a Process so you are running a new Program from the old Program.

That way the second form wont die if you close the first.

Check out the Process class.

http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx[^]

I know this is not the form within a form as you asked but you may find it useful
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900