Open Form in a Form

  • Thread starter Thread starter Carlos J. Quintero [.NET MVP]
  • Start date Start date
C

Carlos J. Quintero [.NET MVP]

Couldn´t you use a Usercontrol to be hosted in a form or in a panel?

--
Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
 
Hi All,
i was wondering , how is posible to open a Form inside a Panel (for example)
not through MDI property, is a container the right tool for this? How am
MDIParent form is doing it?
thx in advance
 
Nassos said:
Hi All,
i was wondering , how is posible to open a Form inside a Panel (for
example) not through MDI property, is a container the right tool for this?
How am MDIParent form is doing it?
thx in advance

An MDI parent has an MDIClient control to host forms. Why do you not want an
MDI Form? You can dock other panels in an MDI Form so as to restrict the
MDIClient bounds. See the example on my site:
http://dotnetrix.co.uk/mdi.html

Other than that you should set the forms TopLevel property to False and add
it as a Control, but it will always show as unfocused.
 
If you must use a form, just set its TopLevel property to False and set
its parent to the panel and then show it. It will appear inside the
panel (but without a caption bar though).
 
I want to thank you all for your replies, most appriciated, the TopLevel
property is the think i was looking thanx :-)
 
Chris,

Chris Dunaway said:
If you must use a form, just set its TopLevel property to False and set
its parent to the panel and then show it. It will appear inside the
panel (but without a caption bar though).

The embedded form actually will have a caption bar.
 
I stand corrected. I recall now, having to turn off the caption. It
is often suggested to use a UserControl instead of a form for this type
of thing. Are user controls any more light weight than a form?
 
Back
Top