自己随便建个独立窗口,设3个按钮测试下就知道了:
1024*768
Dim w As Integer = sysinfo.ScreenWidth
Dim h As Integer = Sysinfo.ScreenHeight
With e.Form.BaseForm
.Width = .Width / 1024 * w
.Height = .Height /768 * h
End With
800*600
Dim w As Integer = 800
Dim h As Integer = 600
With e.Form.BaseForm
.Width = .Width / 1024 * w
.Height = .Height /768 * h
End With
1152*864
Dim w As Integer = 1152
Dim h As Integer = 864
With e.Form.BaseForm
.Width = .Width / 1024 * w
.Height = .Height /768 * h
End With