监视器屏幕独立表格大小和尺寸控制尺寸?
在各种情况下,我发现当我们在具有不同显示器尺寸的各种电脑上运行应用程序时,win 窗体的行为会有所不同。有时表单会变大,因此该表单上的一些控件将不可见。所以请告诉我如何设计 win 应用程序,以便无论显示器大小是表单大小,控件位置都会以相同的方式运行所有电脑显示器尺寸。请指导我。谢谢。
in various case i have seen that when we run apps in various pc with different monitor size then win form behave differently. sometime the form get bigger and as a result few control on that form will not visible.so please tell me how to design win apps in such a way that what ever the monitor size would be the form size and control position will behave same way in all the pc monitor size.please guide me.thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用控件的 Anchor 属性。默认锚点是顶部、左侧。如果您希望控件宽度随表单而增加,请将其设置为上、左、右。根据您的要求调整锚点。
Use Anchor Property of the Control. Default Anchor is Top,Left. If you want Control Width to increase with Form, Set it to Top, Left, Right. Adjust the Anchors according to your requirement.
在控件布局方面您有多种选择。锚定是最常见的方式,但您还应该研究对接和表格布局面板。
You have many options in terms of layout of controls. Anchoring is the most common way, but you should also investigate docking and table layout panels.