Click here to Skip to main content
15,947,958 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can u plz help me...need code for,
opening a form inside a form .....just like opening a image form from a Photoshop main menu.

A form? Bad idea. It is not recommended.

You can do the trick, but what is was a form won't behave like a form, so why not using some container like panel or, better, a TabControl (see below):
Anyway, look at this discussion: print a form on a panel component[^].

Do everything in one form. If you simply need some hierarchy, use tabbed interface based on TabControl. Important: don't use MDI! MDI style is highly discouraged, even by Microsoft. It would be extremely inconvenient, harder to implement and could simply scare of your users. Perhaps it could be remotely tolerable many years ago when good control containers were not so readily available.

Share this answer
ambarishtv 12-May-11 1:54am    
Thanks for giving a valuable info..
Sergey Alexandrovich Kryukov 12-May-11 2:36am    
You're welcome.
Will you formally accept this answer (green button)?
Thank you.
u need to set the parent form to the form that u r opening the new one from
frmnew.parent = frmold

if .open method is not available try .show
Share this answer
Share this answer
Ragi Gopi 11-May-11 2:16am    
ambarishtv 14-May-11 2:55am    
Hi. Solution 3 is correct answer,
ambarishtv 11-May-11 2:25am    
Welcome :)
Ragi Gopi 11-May-11 2:26am    
what is difference between Multi Instance Child and Single Instance Child
Sergey Alexandrovich Kryukov 11-May-11 13:09pm    
Forget about difference! Never use MDI! Do yourself a favor.
Simply use following code to open another form from already opened one:

Inside Already Form:

Form fm = new SecondformName();
Share this answer

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