Question

WiiFan2012

Member
Joined
Jan 15, 2010
Messages
17
Programming Experience
Beginner
I would like to know if its possible to start up a second windows forms inside the parent form. Ex: A button is pressed and a new form is showed. I would like to keep that new form inside the parent form, and have it not be able to go outside the parent form.

Thanks!
 
In future, please provide meaningful titles for your threads. The title is supposed to tell people what the thread is about so that they know which to open and which not. If the thread has a meaningless title then many who could help simply won't open it, so you miss out. Others will open it only to find that they can't help, which is annoying. If you annoy people then they're less likely to help you in future, so you miss out.

As for the question, you would set the IsMdiContainer property of the parent form to True, then assign the parent to the child's MdiParent property before showing the child.
 
In future, please provide meaningful titles for your threads. The title is supposed to tell people what the thread is about so that they know which to open and which not. If the thread has a meaningless title then many who could help simply won't open it, so you miss out. Others will open it only to find that they can't help, which is annoying. If you annoy people then they're less likely to help you in future, so you miss out.

As for the question, you would set the IsMdiContainer property of the parent form to True, then assign the parent to the child's MdiParent property before showing the child.

Thanks. Sorry about the title.. Its a bit of a habit. I'm used to gaming forums and the such and don't realize that in a programming forum, titles need to have info. Next time I will do that.

Once again, thanks for the code and help.
 
Back
Top