简体   繁体   English

C#.NET Winform应用程序中的解决问题

[英]Resolution problem in C# .NET Winform application

I have developed my winform application without caring about the resolution. 我开发了我的winform应用程序而没有关心解决方案。 Now am stuck up on PCs with a lower resolution. 现在我被困在分辨率较低的PC上。 What to do now? 现在做什么? Is there any way of conversion? 有没有转换方式? I mean can the application get the resolution of the PC on which it is running, and set itself accordingly? 我的意思是应用程序可以获得运行它的PC的分辨率,并相应地设置自己吗? Is there not any code or variable of Resolution in Windows which can be used ? Windows中没有可以使用的任何解决方案或变量吗?

您可以使用VirtualScreen.Size获取解决方案。

很难建议......当你创建表格时,你应该注意较小的屏幕: http//www.techrepublic.com/article/manage-winform-controls-using-the-anchor-and-dock-properties/ 6165908

如果想要真正的分辨率独立性,那么您应该使用Windows Presentation Framework进行开发

You could use 你可以用

 Screen.PrimaryScreen.WorkingArea.Size;

and play with control anchoring. 和控制锚定一起玩。 This is how I did it. 这就是我做到的。 Problem also discussed: fit windows form to any screen resolution 还讨论了问题: 适合任何屏幕分辨率的窗体形式

There are a lot of solutions for the problem given but most are based around the fact that you can build them into you're application from the start. 对于给出的问题有很多解决方案,但大多数解决方案都是基于这样一个事实,即您可以从一开始就将它们构建到应用程序中。

Simply manually changing the layout of you're application might be the 'fastest' way to go. 简单地手动更改应用程序的布局可能是“最快”的方法。

Getting 10 users to use a higher resolution might cost 10 * 100 dollar changing the application might costs 40 hours depending on application size. 让10个用户使用更高的分辨率可能需要花费10 * 100美元,根据应用程序的大小,更改应用程序可能需要40个小时。

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

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