Hi people,

I´m newbie in .NET and I´m using Visual C++.
Can I to insert a windows form inside of another windows form like a panel?

Thanks for help!


Wellington Eliel Lopes

Re: Form inside of another form by Tim

Tim
Mon Jun 20 10:20:50 CDT 2005

Try something like this (in C#)...

Form2 f = new Form2();
f.TopLevel = false;
this.panel1.Controls.Add(f);
f.Show();

In addition, since the title bar will show up, you might also want to add
the following line...

f.FormBorderStyle = FormBorderStyle.None;

Is it absolutely necessary to keep the functionality within a Form, or could
you design this as a UserControl instead?

--
Tim Wilson
.Net Compact Framework MVP

"Wellington Eliel Lopes" <welopes@hotmail.com> wrote in message
news:OwodwaadFHA.2736@TK2MSFTNGP12.phx.gbl...
> Hi people,
>
> I´m newbie in .NET and I´m using Visual C++.
> Can I to insert a windows form inside of another windows form like a
panel?
>
> Thanks for help!
>
>
> Wellington Eliel Lopes
>
>



Re: Form inside of another form by Herfried

Herfried
Mon Jun 20 11:26:47 CDT 2005

"Wellington Eliel Lopes" <welopes@hotmail.com> schrieb:
> I´m newbie in .NET and I´m using Visual C++.
> Can I to insert a windows form inside of another windows form like a
> panel?

You may want to use a usercontrol (composite control) instead of an embedded
form. Usercontrol can be added to a project by selecting "Project" -> "Add
UserControl...".

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


Re: Form inside of another form by Peter

Peter
Tue Jun 21 10:42:53 CDT 2005

> You may want to use a usercontrol (composite control) instead of an
embedded
> form. Usercontrol can be added to a project by selecting "Project" ->
"Add
> UserControl...".

I can second that. This is far the easiest way.

PeterV