1
votes

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

2
Have you written any code on Resize event.Romil Kumar Jain
i set showicon to false in there, too but still not working...mucisk
Check the property of ShowIcon in window resize.Romil Kumar Jain
@RajeshSubramanian if i cant do anything i will do this way.mucisk

2 Answers

3
votes

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.

0
votes

In the ItemAdded event:

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

    e.item.Visible = false;

}