[英]MDI child shows icon when maximized
I have an MDI parent and MDI child. 我有一个MDI父母和MDI孩子。 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: 子表单的showicon
值设置为false
,但是当它最大化时,它仍然显示一个图标:
MDI requires these frame decorations to be present, it will misbehave in various ways when you try to hide them. MDI要求存在这些框架装饰,当您尝试隐藏它们时,它会以各种方式行为不当。 A simple workaround is to create an icon that's entirely transparent. 一个简单的解决方法是创建一个完全透明的图标。
In the ItemAdded
event: 在ItemAdded
事件中:
if (e.item.Text == "" )
{
e.item.Visible = false;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.