form inside a form

  • Thread starter Thread starter Jessica Weiner
  • Start date Start date
J

Jessica Weiner

I have two windows forms in an application. I want one form to be embedded
into the other. How can this be done? Can I do something like:

Form1.Controls.Add(Form2);

Thanks.
Jess
 
Tim said:
You can go the MDI route if that makes sense in your application -
you have a main Form that hosts multiple "documents". Otherwise,
literally embedded a Form onto another Form as if it were a control
can be done; however, are you sure you don't want to build a
container control, like a UserControl, and then place instances of
this control on the Form?

I looked into Mdi and it was exactly what I needed. Thanks, that was very
helpful.

Jess
 
Hi,

Jessica Weiner said:
I looked into Mdi and it was exactly what I needed. Thanks, that was very
helpful.

Note that MDI is intended for a window to "potentially" contain more than
one window, if you always will have a single window inside you would go
better transforming the second form in a usercontrol or a panel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top