简体   繁体   English

Winforms 控件在某些计算机上转移的问题

[英]Issue with Winforms Controls Shifting On Some Computers

I am running into an issue where on one of my user's pc (Win10) the comboboxes are being shifted.我遇到了一个问题,在我的用户的一台电脑(Win10)上,组合框正在移动。 On the left is how they look in the user control and on the left is how they are displayed to the user.左侧是它们在用户控件中的外观,左侧是它们向用户显示的方式。 They have the same display settings as the other users, so same screen resolution, scale, and orientation.他们与其他用户具有相同的显示设置,因此具有相同的屏幕分辨率、比例和方向。 I checked the anchoring for the dropdownlist and it is anchored the same as the textboxes.我检查了下拉列表的锚定,它的锚定与文本框相同。 I am at a loss at what to check next to see where the issue is and hoping someone might know something else I can check.我不知道接下来要检查什么以查看问题出在哪里,并希望有人可能知道我可以检查的其他内容。 Thanks.谢谢。

在此处输入图像描述

I want to thank @brennan208 for his help in troubleshooting the issue.我要感谢 @brennan208 在解决问题方面提供的帮助。 After a bit of discussion with Telerik they pointed me to their documentation here that has general tips for designing scalable WinForms.在与 Telerik 进行了一些讨论后,他们向我指出了他们的文档其中包含设计可扩展 WinForms 的一般技巧。 What I needed to do was place my controls in a TableLayoutPanel, so now when I change the scaling the controls correctly scale as well.我需要做的是将我的控件放在 TableLayoutPanel 中,所以现在当我更改缩放时,控件也会正确缩放。 Painful lesson and I hope the article helps others.痛苦的教训,我希望这篇文章对其他人有所帮助。 Thanks.谢谢。

Wade韦德

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

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