以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  窗口中SplitContainer问题  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=73061)

--  作者:cuicuibing
--  发布时间:2015/8/11 16:32:00
--  窗口中SplitContainer问题
在SplitContainer中,有一排按钮,在老的显示器上面按钮被遮挡了。如何让按钮根据屏幕的宽窄进行调整。
--  作者:大红袍
--  发布时间:2015/8/11 17:14:00
--  
自适应

 

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


--  作者:大红袍
--  发布时间:2015/8/11 17:15:00
--  
显示不全的问题,你可以把 自动滚动 属性设置成true