Showing form in a panel

G

Guest

Hi Perspolis,
it is not possible to show a form in a panel container. If you have an
existing form and want to show its UI in the panel as well then abstract the
code into a user control which you can embed inside the panel and the form.

Mark Dawson
http://www.markdawson.org
 
S

Stoitcho Goutsev \(100\)

Yes it is.
Set the form's TopLevel proeprty to *false*. This propery is not visible in
the property windows, so you need to set it from code.

Keep in mind that seting this property makes the form a child window
(regural control so to speak). It will look like a form with all the
captions and stuff, but in the reality will be a control, which means that
some of the features available on for the top-level windows will not be
available - such as the form won't be able to host a main menu, some of the
events such as Activate and Decativate may not work in the same way, etc.
When I say that the form cannot have main menu I mean the MainMenu component
from .NET1.x, in .NET 2.0 probably the menu strip will still work.
 

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

Top