我需要调整表单大小并使其占据屏幕的 80%,目前,这就是我所拥有的
Dim Sw As Integer = CInt(Screen.PrimaryScreen.Bounds.Width * 0.8)
Dim Sh As Integer = CInt(Screen.PrimaryScreen.Bounds.Height * 0.8)
Dim nTaskBarHeight As Integer = Screen.PrimaryScreen.Bounds.Bottom - Screen.PrimaryScreen.WorkingArea.Bottom
Me.Size = New Size(Sw, Sh - nTaskBarHeight)
但它不居中,有人可以帮忙吗?