我的程序段如下,可以实现,但是如果在窗体上有sstab控件,则sstab控件内的其他控件不会跟随窗体按比例变化,而且sstab不同页面最终显示的都是同一个页面下的控件,这是怎么回事?
请教!Private Sub Form_Load()
i = 0
Dim c As Control
For Each c In Me
L(i) = c.Left
T(i) = c.Top
W(i) = c.Width
H(i) = c.Height
i = i + 1
Next c
a = Form1.ScaleHeight
b = Form1.ScaleWidth
End SubPrivate Sub Form_Resize()
Form1.ScaleHeight = a
Form1.ScaleWidth = b
Dim c As Control
i = 0
For Each c In Me
c.Left = L(i)
c.Top = T(i)
c.Width = W(i)
c.Height = H(i)
i = i + 1
Next c
End Sub
请教!Private Sub Form_Load()
i = 0
Dim c As Control
For Each c In Me
L(i) = c.Left
T(i) = c.Top
W(i) = c.Width
H(i) = c.Height
i = i + 1
Next c
a = Form1.ScaleHeight
b = Form1.ScaleWidth
End SubPrivate Sub Form_Resize()
Form1.ScaleHeight = a
Form1.ScaleWidth = b
Dim c As Control
i = 0
For Each c In Me
c.Left = L(i)
c.Top = T(i)
c.Width = W(i)
c.Height = H(i)
i = i + 1
Next c
End Sub
在不同tab頁畫上去就可以了
有的发给我,不甚感谢。
[email protected]