Reputation: 299
I got a strange problem. My mdi child form has 2 close buttons and 2 maximized buttons.
A screenshot of the problem:
I create the mdi child like this:
summaryForm.MdiParent = ContainerForm;
summaryForm.WindowState = FormWindowState.Maximized;
summaryForm.Show();
If I get rid of "summaryForm.WindowState = FormWindowState.Maximized;"
, the window style is correct. But I hope to make the mdi child form maximized when created.
Upvotes: 10
Views: 1082
Reputation: 104781
It's a bug in Winforms. This will happen when the child is created by the parent's constructor. Move it to the Load event.
Upvotes: 6