简体   繁体   English

Visual Studio Windows 表单大小问题

[英]Visual Studio Windows Form Size Problem

I'm new to Visual Studio 2010 and I just figured out that the maximum size of the forms that can be created is 1292x812.我是 Visual Studio 2010 的新手,我刚刚发现可以创建的 forms 的最大大小为 1292x812。 I need to have many text boxes for the information I needed.我需要有很多文本框来存储我需要的信息。 However, the size of the form is too small that I can hardly see spaces for other text box.但是,表单的大小太小,我几乎看不到其他文本框的空格。 Is there a way to create a form with a scroll bar in it so that even though I have many text boxes it will be access in one form and not to create another form?有没有办法创建一个带有滚动条的表单,这样即使我有很多文本框,它也可以在一个表单中访问而不是创建另一个表单? Please help.请帮忙。 Thanks谢谢

I think the max size that you're being allowed is related to the size of your desktop area: My VS2010 just allowed me up to 5132x1092 which would roughly tie with my 3 monitors.我认为您被允许的最大尺寸与您的桌面区域的大小有关:我的 VS2010 只允许我达到 5132x1092,这与我的 3 台显示器大致相当。

You should size the form so that it looks sensible if you resize your desktop to a common res such as 1024x768, otherwise it'll be too big for the screen for some users.如果您将桌面调整为常见的分辨率(例如 1024x768),您应该调整表单的大小,使其看起来合理,否则对于某些用户来说屏幕太大了。

If you've got that much information you should break it down into logical groups, then use Tabs, or SubForms to show the data.如果您有这么多信息,您应该将其分解为逻辑组,然后使用选项卡或子表单来显示数据。

Putting too much info on one form makes it impossible for the user, and results in monster amounts of code behind the form which is hard to maintain.在一个表单上放置太多信息会使用户无法使用,并导致表单后面的代码量巨大,难以维护。

The maximum size of the form is limited by the resolution of the screen on which your developing on.表格的最大尺寸受限于您在其上进行开发的屏幕的分辨率。

To answer your question, you work around this issue by dropping a Panel control onto the form and sizing it to whichever size you want.要回答您的问题,您可以通过将 Panel 控件拖放到表单上并将其调整为您想要的任何大小来解决此问题。 All of your controls are then placed on this panel control rather than the form directly.然后,您的所有控件都放置在此面板控件上,而不是直接放置在表单上。 The panel will automatically add scroll bars as needed.面板会根据需要自动添加滚动条。

That said, what you are attempting to do is considered one of the classic "bad ideas" in UI design.也就是说,您尝试做的事情被认为是 UI 设计中经典的“坏主意”之一。 When you create a screen like this you're asking the user to process more information than the brain could possibly digest.当您创建这样的屏幕时,您是在要求用户处理比大脑可能消化的更多的信息。 You question suggests you want to add hundreds of text boxs to a form while the user would feel overwhelmed by 10.您的问题表明您想在表单中添加数百个文本框,而用户会感到不知所措 10。

Please take a look at http://www.joelonsoftware.com and read his articles on UI design.请查看http://www.joelonsoftware.com并阅读他关于 UI 设计的文章。 They are the best starting point for any new programmer working with UI.它们是任何使用 UI 的新程序员的最佳起点。

Add a bigger panel to the form and set a scrollbar.向表单添加更大的面板并设置滚动条。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM