我应该为WinForm对话框使用的最大大小是多少?

时间:2021-08-02 07:11:11

I'm designing some dialog boxes, and I'm having a hard time to fit everything. (and it has to fit on a single dialog box by design, so please don't tell me I should make two dialogs instead of one:))

我正在设计一些对话框,我很难适应一切。 (并且它必须符合设计的单个对话框,所以请不要告诉我我应该制作两个对话框而不是一个:))

I'm wondering what's the max size a dialog can have before being annoying for the end user. Of course it should't be bigger than his resolution, but are there any other boundaries to consider?

我想知道对话在最终用户烦恼之前可以拥有的最大大小是多少。当然它不应该大于他的分辨率,但是还有其他的界限需要考虑吗?

I'm trying to limit at 800x580 (so that it can display fine on a 800x600 screen without hiding the taskbar), but I expect my users to be on 1024x768 or better screen resolutions.

我试图限制在800x580(这样它可以在800x600屏幕上显示而不隐藏任务栏),但我希望我的用户能够在1024x768或更好的屏幕分辨率。

Is a 800x580 dialog box ok, or is it too big?

800x580对话框没问题,还是太大了?

5 个解决方案

#1


Have you considered using a tabbed layout?

您是否考虑过使用标签式布局?

Also, I believe the smallest main-stream screen resolution is 1024x600.

另外,我认为最小的主流屏幕分辨率是1024x600。

I'd say anything over that is too big. I try to stick below 1000x500.

我会说任何事都太大了。我试着坚持1000x500以下。

#2


I'm writing this on a netbook (ASUS) with resolution 1024 x 600. I've also noticed this is a defacto standard for most other netbooks too.

我在一台分辨率为1024 x 600的上网本(ASUS)上写这个。我也注意到这也是大多数其他上网本的事实标准。

Another option: you could create a dialog that resizes itself automatically to fill the current desktop (except for the task bar).

另一个选项:您可以创建一个对话框,自动调整其大小以填充当前桌面(任务栏除外)。

It could also enforce a "flow" style layout for it's child controls. This would ensure the best use of the available space is made.

它还可以为其子控件强制执行“流”样式布局。这将确保最佳地利用可用空间。

To get "flowing" in Windows forms you can use either the flow layout control or (for a richer interface) the WebBrowser control.

要在Windows窗体中“流动”,您可以使用流布局控件或(对于更丰富的界面)WebBrowser控件。

By the way, modal dialogs seem to be less popular as a way of user interaction these days. Especially large dialogs containing a lot of information/controls. This article has some good alternatives.

顺便说一下,模态对话框现在似乎不太受欢迎,作为用户交互的一种方式。特别是包含大量信息/控件的大型对话框。这篇文章有一些很好的选择。

#3


I think that if the user NEEDS to see all data on screen at the same time... and you can fit everything in 800x580... I think that it's a fine size.

我认为,如果用户需要同时在屏幕上查看所有数据...并且您可以将所有内容都安装在800x580 ...我认为这是一个很好的尺寸。

If you know all users have bigger resolutions so don't struggle... that size is OK.

如果你知道所有用户都拥有更大的分辨率,那就不要挣扎......那个尺寸还可以。

However... a way of showing lots of information and being able to edit it... could be a PropertyGrid control (an example here)... may be that could shrink a bit the form if you don't feel confortable with it being so big. Don't know if it a possibility given the needs of your client/user.

然而......一种显示大量信息并能够编辑它的方法......可能是一个PropertyGrid控件(这里的一个例子)...如果你觉得不舒服,可能会缩小形式它太大了。不知道是否有可能满足您的客户/用户的需求。

#4


Just hope that no-one ever tries using your app on a media center running through a standard definition display. That's 640x480 for NTSC. I've suffered this problem with quite a few apps.

只希望没有人尝试在通过标准清晰度显示器运行的媒体中心上使用您的应用程序。那是NTSC的640x480。我有很多应用程序遇到了这个问题。

#5


Whatever your pixel by pixel size, if it takes more than a few seconds for skilled users to complete the use of your window, then it shouldn’t be a dialog. Anything longer is annoying. You’d be asking your users to do too much work that is too easy to lose (e.g., by hitting Cancel accidentally) and too hard to re-entered (e.g., between sessions). If you have so many controls that the dialog needs to be 800 by anything, then it’s too many controls. 200,000 square pixels and 40 controls is the very most you should consider for a dialog. And tabs are nature’s way of saying your dialog is too complex.

无论您的像素大小是多少,如果熟练的用户需要超过几秒钟才能完成窗口的使用,那么它不应该是一个对话框。任何更长的东西都很烦人。你要求你的用户做太多容易丢失的工作(例如,通过意外点击取消)并且太难以重新输入(例如,在会话之间)。如果你有这么多的控​​件,对话框需要800,那么控制太多了。 200,000个方形像素和40个控件是您应该考虑的对话框。标签是大自然说你的对话太复杂的方式。

Dialogs are for entering parameters to execute a single command on one or more data objects visible in the primary window for the dialog, which is why dialogs need to be small and simple. I suspect that’s not what you’re doing. Instead, you’re using a “dialog” to represent the main data objects and carry out a major task, not a single command.

对话框用于输入参数以在对话框的主窗口中可见的一个或多个数据对象上执行单个命令,这就是对话需要小而简单的原因。我怀疑那不是你在做什么。相反,您使用“对话框”来表示主要数据对象并执行主要任务,而不是单个命令。

What you want is a primary window, not a dialog, with all the support necessary for the complicated task you’ve set up for the user. That includes providing a means for users to save, retrieve, and copy their work. That means a menu bar and toolbar with all the standard commands, including help. The window should absolutely be modeless, and be resizable, maximizable, and minimizable.

你想要的是一个主窗口,而不是一个对话框,具有为用户设置的复杂任务所需的所有支持。这包括为用户提供保存,检索和复制其工作的方法。这意味着菜单栏和工具栏包含所有标准命令,包括帮助。窗口绝对应该是无模式的,并且可以调整大小,最大化和最小化。

Primary windows should be designed to work best at the size of most (over half) of your users’ screens. 1024x768 is generally fine for today’s laptop/desktop screens, not that you should use that much space if you don’t have to. If the user’s screen is smaller, or the user for any reason resizes your window below the design size, then scrollbars should appear to allow full access to all controls and content in the form –just like any primary window. The experience on the web indicates that scrolling is not a showstopper for forms.

主窗口应设计为最适合用户屏幕大多数(超过一半)的大小。对于今天的笔记本电脑/台式机屏幕来说,1024x768通常都不错,但如果你不需要,你应该使用那么多的空间。如果用户的屏幕较小,或者用户出于任何原因将窗口调整为低于设计大小,则滚动条应该显示为允许完全访问表单中的所有控件和内容 - 就像任何主窗口一样。网络上的体验表明,滚动不是表单的一个显示。

Beyond that, tabs may be used in a primary window to increase the number of controls on it. You said you don’t want to hear about multiple windows, but multiple windows should be used instead of tabs if the user will be comparing data across tabs/windows. You can also fit more in a given primary window size by using a compact presentation (I describe this at http://www.zuschlogin.com/?p=42), but test such an approach on your users before committing to it.

除此之外,可以在主窗口中使用选项卡来增加其上的控件数量。您说您不希望听到多个窗口,但如果用户将跨选项卡/窗口比较数据,则应使用多个窗口而不是选项卡。您还可以使用紧凑的演示文稿(我在http://www.zuschlogin.com/?p=42中对此进行描述)在给定的主窗口大小中放入更多内容,但在提交之前对您的用户测试此类方法。

#1


Have you considered using a tabbed layout?

您是否考虑过使用标签式布局?

Also, I believe the smallest main-stream screen resolution is 1024x600.

另外,我认为最小的主流屏幕分辨率是1024x600。

I'd say anything over that is too big. I try to stick below 1000x500.

我会说任何事都太大了。我试着坚持1000x500以下。

#2


I'm writing this on a netbook (ASUS) with resolution 1024 x 600. I've also noticed this is a defacto standard for most other netbooks too.

我在一台分辨率为1024 x 600的上网本(ASUS)上写这个。我也注意到这也是大多数其他上网本的事实标准。

Another option: you could create a dialog that resizes itself automatically to fill the current desktop (except for the task bar).

另一个选项:您可以创建一个对话框,自动调整其大小以填充当前桌面(任务栏除外)。

It could also enforce a "flow" style layout for it's child controls. This would ensure the best use of the available space is made.

它还可以为其子控件强制执行“流”样式布局。这将确保最佳地利用可用空间。

To get "flowing" in Windows forms you can use either the flow layout control or (for a richer interface) the WebBrowser control.

要在Windows窗体中“流动”,您可以使用流布局控件或(对于更丰富的界面)WebBrowser控件。

By the way, modal dialogs seem to be less popular as a way of user interaction these days. Especially large dialogs containing a lot of information/controls. This article has some good alternatives.

顺便说一下,模态对话框现在似乎不太受欢迎,作为用户交互的一种方式。特别是包含大量信息/控件的大型对话框。这篇文章有一些很好的选择。

#3


I think that if the user NEEDS to see all data on screen at the same time... and you can fit everything in 800x580... I think that it's a fine size.

我认为,如果用户需要同时在屏幕上查看所有数据...并且您可以将所有内容都安装在800x580 ...我认为这是一个很好的尺寸。

If you know all users have bigger resolutions so don't struggle... that size is OK.

如果你知道所有用户都拥有更大的分辨率,那就不要挣扎......那个尺寸还可以。

However... a way of showing lots of information and being able to edit it... could be a PropertyGrid control (an example here)... may be that could shrink a bit the form if you don't feel confortable with it being so big. Don't know if it a possibility given the needs of your client/user.

然而......一种显示大量信息并能够编辑它的方法......可能是一个PropertyGrid控件(这里的一个例子)...如果你觉得不舒服,可能会缩小形式它太大了。不知道是否有可能满足您的客户/用户的需求。

#4


Just hope that no-one ever tries using your app on a media center running through a standard definition display. That's 640x480 for NTSC. I've suffered this problem with quite a few apps.

只希望没有人尝试在通过标准清晰度显示器运行的媒体中心上使用您的应用程序。那是NTSC的640x480。我有很多应用程序遇到了这个问题。

#5


Whatever your pixel by pixel size, if it takes more than a few seconds for skilled users to complete the use of your window, then it shouldn’t be a dialog. Anything longer is annoying. You’d be asking your users to do too much work that is too easy to lose (e.g., by hitting Cancel accidentally) and too hard to re-entered (e.g., between sessions). If you have so many controls that the dialog needs to be 800 by anything, then it’s too many controls. 200,000 square pixels and 40 controls is the very most you should consider for a dialog. And tabs are nature’s way of saying your dialog is too complex.

无论您的像素大小是多少,如果熟练的用户需要超过几秒钟才能完成窗口的使用,那么它不应该是一个对话框。任何更长的东西都很烦人。你要求你的用户做太多容易丢失的工作(例如,通过意外点击取消)并且太难以重新输入(例如,在会话之间)。如果你有这么多的控​​件,对话框需要800,那么控制太多了。 200,000个方形像素和40个控件是您应该考虑的对话框。标签是大自然说你的对话太复杂的方式。

Dialogs are for entering parameters to execute a single command on one or more data objects visible in the primary window for the dialog, which is why dialogs need to be small and simple. I suspect that’s not what you’re doing. Instead, you’re using a “dialog” to represent the main data objects and carry out a major task, not a single command.

对话框用于输入参数以在对话框的主窗口中可见的一个或多个数据对象上执行单个命令,这就是对话需要小而简单的原因。我怀疑那不是你在做什么。相反,您使用“对话框”来表示主要数据对象并执行主要任务,而不是单个命令。

What you want is a primary window, not a dialog, with all the support necessary for the complicated task you’ve set up for the user. That includes providing a means for users to save, retrieve, and copy their work. That means a menu bar and toolbar with all the standard commands, including help. The window should absolutely be modeless, and be resizable, maximizable, and minimizable.

你想要的是一个主窗口,而不是一个对话框,具有为用户设置的复杂任务所需的所有支持。这包括为用户提供保存,检索和复制其工作的方法。这意味着菜单栏和工具栏包含所有标准命令,包括帮助。窗口绝对应该是无模式的,并且可以调整大小,最大化和最小化。

Primary windows should be designed to work best at the size of most (over half) of your users’ screens. 1024x768 is generally fine for today’s laptop/desktop screens, not that you should use that much space if you don’t have to. If the user’s screen is smaller, or the user for any reason resizes your window below the design size, then scrollbars should appear to allow full access to all controls and content in the form –just like any primary window. The experience on the web indicates that scrolling is not a showstopper for forms.

主窗口应设计为最适合用户屏幕大多数(超过一半)的大小。对于今天的笔记本电脑/台式机屏幕来说,1024x768通常都不错,但如果你不需要,你应该使用那么多的空间。如果用户的屏幕较小,或者用户出于任何原因将窗口调整为低于设计大小,则滚动条应该显示为允许完全访问表单中的所有控件和内容 - 就像任何主窗口一样。网络上的体验表明,滚动不是表单的一个显示。

Beyond that, tabs may be used in a primary window to increase the number of controls on it. You said you don’t want to hear about multiple windows, but multiple windows should be used instead of tabs if the user will be comparing data across tabs/windows. You can also fit more in a given primary window size by using a compact presentation (I describe this at http://www.zuschlogin.com/?p=42), but test such an approach on your users before committing to it.

除此之外,可以在主窗口中使用选项卡来增加其上的控件数量。您说您不希望听到多个窗口,但如果用户将跨选项卡/窗口比较数据,则应使用多个窗口而不是选项卡。您还可以使用紧凑的演示文稿(我在http://www.zuschlogin.com/?p=42中对此进行描述)在给定的主窗口大小中放入更多内容,但在提交之前对您的用户测试此类方法。