这是 Me.Top 的 .NET Framework 错误吗?
我想我在设置或获取表单的 Me.Top 属性时发现了一个错误。 我使用的是 VS2010 VB.NET .NET Framework 4.0
我的显示器设置有点不寻常:
Primary 1600 x 900
1680 x 1050
1680 x 1050
在 1 号监视器上,一切按预期运行。在监视器 2 或 3 上,如果我设置 Me.Top = 0
,则表单将显示在距屏幕顶部 150 像素的位置,因此它认为它正在使用主监视器的分辨率。
我必须设置 Me.Top = -150
才能将表单置于屏幕顶部。
有人以前见过这个/知道修复或解决方法吗?
I think I have found a bug when setting or getting the Me.Top property of a form.
I am using VS2010 VB.NET .NET framework 4.0
My monitor setup is slightly unusual:
Primary 1600 x 900
1680 x 1050
1680 x 1050
On monitor number 1 everything works as expected. On monitor 2 or 3 if I set Me.Top = 0
then the form appears 150 pixels from the top of the screen so it thinks that it is using the resolution of the primary monitor.
I have to set Me.Top = -150
to get the form to the top of the screen.
Has anyone seen this before / know of a fix or workaround?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不是一个错误。坐标系与主屏幕相关。
在屏幕布局中,屏幕 2 和 3 的顶部边界比屏幕 1(主屏幕)“更高”。
如果要将窗口布局到屏幕的顶部边界,则应使用 屏幕类。
It's not a bug. The coordinate system is related to the primary screen.
In your layout of screens the screens 2 and 3 has their top bound "higher" than the screen 1 (the primary screen).
If you want layout your window to the top bound of the screen, you should use the Screen class.