C#中的MDI子窗体问题
当我最大化 1 个 MDI 子窗体时,所有 MDI 子窗体也将被最大化。 是否可以使一种形式最大化而另一种形式不最大化?
提前致谢。
When I maximize 1 MDI child form, all MDI child forms would be maximized too. Is it possible to have 1 form maximized and another one not?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
最大化的 MDI 子窗体应占据整个子区域,因此其他子窗体的状态并不重要,因为它们不可见。
A maximized MDI child form should occupy the entire child area and so the state of the other children should not really matter as they are not visible.
如果您想看到一个最大化的窗口,前面有另一个较小的窗口,我认为某种带有对接和浮动面板的用户界面将是更好的选择。 就像它在 Visual Studio 中的工作方式一样。
创建自定义 MDI/非 MDI 功能是一项非常耗时且令人沮丧的工作,最终结果可能会让习惯标准 MDI 的用户感到困惑。
If you want to see a maximized window with another smaller window in front of it, I think some kind of user interface with docking and floating panels would be a better choice. Something like the way it works in Visual Studio.
Creating custom MDI/Non-MDI functionality is very time consuming and frustrating work, and the end result can be confusing to users who are used to standard MDI.
不可能。 你唯一能做的就是将前面的窗口设置为非MDI并且任务栏= no
Not possible. Only thing you can do is to set the window in front non MDI and taskbar = no
是的,您可以执行此操作 - 使用 API 调用 SetParent 而不是设置 .MDIParent。
Yes, you CAN do this - use the API Call SetParent instead of setting .MDIParent.
最大化窗体需要是使用
Child1.Show()
调用的 MDI 子窗体。非最大化窗体不需要是使用
Form1.Show(this)
或Form1.ShowDialog(this)
调用的 MDI 子窗体。The Maximized Form will need to be an MDI Child called with
Child1.Show()
.The non-Maximized Form will need to NOT be an MDI Child called with
Form1.Show(this)
orForm1.ShowDialog(this)
.