471,605 Members | 1,434 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,605 software developers and data experts.

form inside a form

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
Feb 15 '06 #1
3 2783
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?
http://groups.google.com/group/micro...75d20fdf3ce25b

--
Tim Wilson
..NET Compact Framework MVP

"Jessica Weiner" <je*****@gmail.com> wrote in message
news:mj*******************@newssvr11.news.prodigy. com...
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

Feb 15 '06 #2
Tim Wilson wrote:
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
Feb 15 '06 #3
Hi,

"Jessica Weiner" <je*****@gmail.com> wrote in message
news:%k*******************@newssvr29.news.prodigy. net...
Tim Wilson wrote:
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.


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

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Feb 15 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by ray well | last post: by
3 posts views Thread by Roger | last post: by
4 posts views Thread by Daniel R. Rossnagel | last post: by
4 posts views Thread by Alex Maghen | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.