大小尽量按照1024*768分辨率去设计。
如果真要自动适应大小,就看下面的代码
Afterload事件
vars("width") = e.Form.width
vars("height") = e.Form.height
SizeChanged事件
For Each c As Winform.Control In e.Form.Controls
c.Left = c.Left * (e.Form.Width / vars("width"))
c.Top = c.Top * (e.Form.Height / vars("height"))
c.Width = c.Width * (e.Form.Width / vars("width"))
c.Height = c.Height * (e.Form.Height / vars("height"))
Next
msgbox(e.Form.Height / vars("height"))
vars("width") = e.Form.width
vars("height") = e.Form.height