如何根据c#.net windows应用程序中的系统分辨率设置窗体分辨率? [英] How can i set windows form resolution according to system resolution in c# .net windows application?

查看:154
本文介绍了如何根据c#.net windows应用程序中的系统分辨率设置窗体分辨率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



如何根据c#.net windows应用程序中的系统分辨率设置中心屏幕窗口的分辨率?



我的应用程序开发了1680×1050分辨率,但现在我运行1280×800分辨率,所以我的应用程序现在正常显示。



底部结束已经没有在1280年以800分辨率显示。



请帮助我根据任何系统分辨率设置分辨率。

我的应用程序它应该在任何系统上正确显示在中央屏幕上。



请帮帮我。



先谢谢。



Ankit Agarwal

软件工程师

Hello,

How can i set center screen windows form resolution according to system resolution in c# .net windows application?

My application had develop 1680 by 1050 resolution, but now i running 1280 by 800 resolution so my application its now showing properly.

Bottom end has been not showing in 1280 by 800 resolution.

Please help me how will be set resolution according to any system resolution.
My Application it should be shown center screen on any system properly.

Please help me.

Thanks in Advance.

Ankit Agarwal
Software Engineer

推荐答案

申请表格有没有决议。表单占据了屏幕的一部分。如果调整表单大小会改变控件的比例,那将是一团糟。所以你需要做的是考虑布局而不是控件的位置。 WPF为您提供了更好的工具,但在Windows窗体中,您有一些不可能性:

停靠 [ ^ ], autsizing [ ^ ]和主播 [ ^ ]

流程布局 [ ^ ]和表格布局 [ ^ ]

当然你可以设置窗口位置[ ^ ]到,自动 [ ^ ]如果需要。
The application forms have no resolution. The form takes a portion of the screen. It would be a mess if resizing a form would change the scale of the controls. So what you need do do is to think in layout and not in position of the controls. WPF is giving you better tools, but in windows forms you have some impossibilities:
Docking[^], autsizing[^] and anchors[^]
Flow layout[^] and Table layout[^]
But of course you can set window position[^] to, automatically[^] if you need.


使用表布局面板等容器,简单面板等根据要求将控件放入内部

学习 dock,Anchor cntrols的属性



快乐编码!

:)
use contaners like table layout panel , simple panels etc. put controls inside as per requirement
learn dock, Anchor properties of cntrols

Happy Coding!
:)


这篇关于如何根据c#.net windows应用程序中的系统分辨率设置窗体分辨率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆