Reputation: 9866
The problem is this - I have a main form (parent
) with a menu and several other forms which are children I want them to load in the main form. The problem that I met is - the child
form is loaded within the main form(parent
) but it looks like a separate window. This:
And it not only stays like window within a window but also don't get resized when the parent
is which seems logical but is not what I want.
What I want is something like this :
I want the child
forms to be loaded without the window controllers for minimize
, maximize
, close
, the blue line and all that stuff but instead to look like a part of the parent
window and respond to some parent events like resize
.
Upvotes: 1
Views: 1392
Reputation: 1535
Try adding the following code into your children windows (and subscribe on FormLoaded event)
private void FormLoad(object sender, EventArgs e)
{
FormBorderStyle = FormBorderStyle.None;
WindowState = FormWindowState.Maximized;
}
Upvotes: 2