不是这个,就一段代码,还不用分行。非常简短,论坛里有,可是找不到。
以下是引用lin_hailun在2012-11-2 11:04:00的发言:
你是不是想找这个?
msgbox("显示器分辨率为:" & SysInfo.ScreenWidth & " * " & SysInfo.ScreenHeight)
msgbox("可用工作区大小:" & SysInfo.WorkingAreaWidth & " * " & SysInfo.WorkingAreaHeight)
e.Form.BaseForm.Width = SysInfo.ScreenWidth
e.Form.BaseForm.Height = SysInfo.ScreenHeight
---------------------------------------------------------
然后这样?
For Each c As Winform.Control In e.Form.Controls
c.Left = c.Left * (SysInfo.ScreenWidth / e.Form.Width)
c.Top = c.Top * (SysInfo.ScreenHeight / e.Form.Height)
c.Width = c.Width * (SysInfo.ScreenWidth / e.Form.Width)
c.Height = c.Height * (SysInfo.ScreenHeight / e.Form.Height)
Next
------------------------------------------------------------------------
建议还是用主窗口吧。然后,不要设置锚定……
[此贴子已经被作者于2012-11-2 11:04:10编辑过]