【发布时间】:2013-04-21 06:49:24
【问题描述】:
我需要将辅助表单对齐到其他表单的右边框。
当我们在启用 AERO 的情况下编译和运行 COMPILED 应用程序(而不是从 IDE 运行它)时,会发生以下情况:
感谢 GJKH 的大力支持:How to determine correctly the Non-Client Area Size for Aero?
...现在我可以将辅助表单对齐到主表单的右侧, 但是第二个表单仍然没有对齐顶部的一点像素:
这是我正在使用的代码:
If Debugger.IsAttached Then
Form2.Location = New Point(Me.Right, Me.Top)
Else
Form2.Location = New Point((Me.Location.X + (Me.Width + (Me.Width - Me.ClientSize.Width))), Me.Location.Y)
End If
【问题讨论】:
标签: .net vb.net winforms nonclient nonclient-area