防止 MDI 应用程序中窗口混乱的最佳方法

发布于 2024-09-28 02:53:26 字数 256 浏览 0 评论 0原文

我目前正在 .net 4.0 中设计一个 MDI 应用程序(自定义 CRM),我开始不喜欢整个界面,因为没有真正的方法来跟踪哪些窗口打开或关闭,这可能会导致非常糟糕的结果。令人困惑的界面。

避免这种情况的最佳方法是什么? - 我应该实现一个任务栏来跟踪每个打开的 MDI 子项吗? - 我应该使用对话框来防止多任务处理吗? - 有没有办法改变mdi容器上最小化窗口的大小(为什么它们这么小,你甚至无法这样阅读完整的表单标题......)

抱歉有这么多问题,提前致谢。

I'm currently designing an MDI application (a custom CRM) in .net 4.0 and i'm starting to dislike the whole interface simply because there's no real way to track which windows are open or closed and it'll probably lead to a very confusing interface.

What is the best way to avoid this?
- Should i implement a taskbar to track every open mdi child?
- Should i use dialogs instead to prevent multi-tasking?
- Is there any way to change the size of a minimized window on a mdi container (why are they so small, you can't even read the full form title that way...)

Sorry for so many questions, thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

桃气十足 2024-10-05 02:53:27

MDI 有其用途,但正如您所发现的,它很容易导致界面混乱、难以使用。当前处理此问题的流行方法是添加选项卡控件(如在任何 Web 浏览器或大多数文本编辑器/IDE 中)以允许在打开的视图之间进行切换。我猜这接近任务栏。

其他选项包括 Outlook 栏(Outlook 左侧的大视图选择器)等控件,或者可能只是包含当前打开的视图的简单列表框。

或者,考虑您真正希望多个窗口可用的频率以及其中大多数是否是“工具窗口”。如果是这样,也许可以考虑为这些工具窗口使用停靠窗口,并为应用程序的其余部分使用单文档界面。一切都取决于您实际在做什么!

MDI has its uses, but as you've found can easily lead to a cluttered, hard-to-use interface. The current in-vogue way of dealing with this is to add a tab control (as in any web browser, or most text editors/IDEs) to allow switching between open views. This is close to a task bar I guess.

Other options are controls like the Outlook bar (the big view chooser down the left-hand side of Outlook) or possibly just a simple list box with the currently open views.

Alternatively, consider how often you really want multiple windows available and whether most of them are "tool windows". If so, perhaps look at using docking windows for these tool windows, and a Single Document interface for the rest of the app. All depends on what you're actually doing!

寄风 2024-10-05 02:53:27

MDI 窗口管理已经内置了通过菜单跟踪打开的窗口的功能。 ToolStripMenu 有一个 MdiWindowListItem,您可以将其设置为包含打开窗口列表的菜单项的引用。如果菜单附加到 MDI 父窗口,则子窗口会自动填充菜单项。

MDI 的目标之一是允许多任务处理。如果这不是您想要的,请使用不同的设计。

至于更改最小化窗口的大小,显然使用标准 Windows 界面是不可能的。在此处查看更多信息: 是可以在 MDI C# Winforms 中更改最小化窗口的大小。但是您可以删除标准的最小化按钮,添加您自己的按钮,然后在正常状态下对窗口执行您想要的操作。

The MDI windowing management already has the built-in to track open windows by way of the menu. The ToolStripMenu has an MdiWindowListItem that you can set to a reference of the menu item that will contain the list of open windows. If the menu is attached to the MDI parent window, child windows automatically populate the menu item.

One of the objectives of MDI is to allow multitasking. If that's not what you want, use a different design.

As far as changing the size of the minimized windows, apparently it's not possible using the standard Windows interface. See more info here: Is it possible to change size of minimized window in MDI C# Winforms. But you could remove the standard Minimize button, add your own, and do what you want with the windows in a Normal state.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文