mucisk
mucisk

Reputation: 247

MDI child shows icon when maximized

I have an MDI parent and MDI child. I want to hide the icon of the child form in a maximized state, so I tried the following:

g.WindowState = FormWindowState.Normal;
g.ShowIcon = false;
g.Show();
g.WindowState = FormWindowState.Maximized;

The showicon value of the child form is set to false, but when it's maximized, it still shows an icon:

enter image description here

Upvotes: 1

Views: 2884

Answers (2)

Rafael Mello
Rafael Mello

Reputation: 1

In the ItemAdded event:

if (e.item.Text == "" )
{

    e.item.Visible = false;

}

Upvotes: 0

Hans Passant
Hans Passant

Reputation: 942348

MDI requires these frame decorations to be present, it will misbehave in various ways when you try to hide them. A simple workaround is to create an icon that's entirely transparent.

Upvotes: 3

Related Questions