1

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

Eitan T
  • 32,660
  • 14
  • 72
  • 109
mucisk
  • 247
  • 5
  • 13

2 Answers2

3

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.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
0

In the ItemAdded event:

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

    e.item.Visible = false;

}
Pika Supports Ukraine
  • 3,612
  • 10
  • 26
  • 42