确保应用程序独立于用户的屏幕分辨率 [英] Ensuring that application is independent of users' screen resolution

查看:164
本文介绍了确保应用程序独立于用户的屏幕分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有简单的方法来运行在C#在Visual Studio 2005中的任何不同的PC上创建的应用程序,无论其屏幕分辨率为?

Is there any easy way to run an application created in C# on Visual Studio 2005 on any different PC, regardless of its screen resolution?

推荐答案

屏幕分辨率?

Windows窗体.NET 2.0中有一定的机制来处理不同的DPI,它有一个更好的布局系统比.NET 1.1。一般情况下,使用布局面板像FlowLayoutPanel的,TableLayoutPanel中,等等,而不是固定的控制在X / Y坐标,你就会有一个更容易的时间来处理不同的窗口大小。

Windows Forms in .NET 2.0 has some mechanisms for dealing with different DPI and it has a better layout system than in .NET 1.1. In general, use layout panels like FlowLayoutPanel, TableLayoutPanel, etc instead of fixing your controls at X/Y coordinates and you'll have a much easier time dealing with different window sizes.

如果你可以使用WPF,我不记得是适用于Visual Studio 2005中,那么你有独立的分辨率远更多的选择。新闻部的问题会消失和WPF具有的功能,如视框,让你缩放整个窗口或控制均匀。

If you can use WPF which I don't recall being applicable to Visual Studio 2005, then you have much more options for resolution independence. The DPI issue goes away and WPF has features such as ViewBox that lets you scale an entire window or control uniformly.

这篇关于确保应用程序独立于用户的屏幕分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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