不同PC上的显示不一致 [英] Inconsistent display on different PC's

查看:75
本文介绍了不同PC上的显示不一致的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我仍在努力应对不同PC之间C#程序显示的变化。 我已经阅读了过时的帖子,但它们似乎没有解决方案就死路一条。

I'm still struggling with changes in the display of a C# program between different PC's.  I've read the dated threads, but they seem to dead end without resolution.

我们已经确定.NET版本和显示设置在几个不同的PC上是相同的,没有。运气 我正在开发
计算机上运行XP SP3,其中包含.NET版本1.0 SP3,2.0(& SP2),3.0 SP2,3.5 SP1,4客户端配置文件和4 Extended。 我在VS 2005中编写C#。 单选按钮,复选框和文本框在我的PC和2"天真"的窗口中看起来处于正确的位置(相对于我正在编程的背景图像)。 PC在家里,但在我们尝试过的
5 PC上(3 Windows 7,2 XP)这些控件相互重叠或远离t

We've been sure the .NET versions and display settings are the same across a few different PC's with no luck.  I'm running XP SP3 with .NET versions 1.0 SP3, 2.0 (& SP2), 3.0 SP2, 3.5 SP1, 4 Client Profile and 4 Extended on the development machine.  I'm coding C# in VS 2005.  Radio buttons, check boxes and text boxes appear to be in the correct positions (relative to a background image that I'm programming over) in the window on my PC and 2 "naive" PC's at home, but of the 5 PC's at work we've tried this on (3 Windows 7, 2 XP) the controls overlap each other or are positioned away from t

我的印象是.NET和CLR应该处理这些问题,无论其他PC上的显卡和显示设置如何。

I was under the impression that .NET and the CLR were supposed to take care of these problems, regardless of video cards and display settings on other PC's.

Harry Vermillion科罗拉多公园和野生动物水生研究 - 柯林斯堡

Harry Vermillion Colorado Parks and Wildlife Aquatic Reseach - Fort Collins

推荐答案

我知道如果您使用WPF,他们建议检查此类型的SnapToDevicePixels问题。 然而,他们说这只是一个模糊的线问题。 听我说你可能正在使用Windows窗体或Canvas来控制你的控件。 
由于不同设备上的字体长度不同,这两种技术确实存在您提到的问题。 主要原因是控件设置为特定位置。 在使用网格的WPF中不是这种情况,其中网格执行
布局并负责处理。 

I know that if you are using WPF they recommend to check SnapToDevicePixels for this type of issue.  However, they say it just is a blurred line issue.  Sounds to me that you may be using either Windows Forms or a Canvas to put your controls on.  Those two technologies do have the problems you mentioned due to different lengths of fonts on different devices etc.  The main reason is that the controls are set to a specific place.  This is not the case in WPF using a grid, where the grid performs the layout and takes care of that. 

您使用的是< Grid> WPF中的元素?

Are you using a <Grid> element in WPF?


这篇关于不同PC上的显示不一致的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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