这个代码我试过,可以的
Forms("窗口1").Controls("SplitContainer1").Panel2.Collapsed = not Forms("窗口1").Controls("SplitContainer1").Panel2.Collapsed
Dim x As Integer = ScreenWidth/2
Dim y As Integer = ScreenHeight/2
If Forms("窗口1").Controls("SplitContainer1").Panel2.Collapsed = True
x = x-167/2
y = y -387/2
Forms("窗口1").SetBounds(x,y,167,387)
Else
x = x-687/2
y = y -387/2
Forms("窗口1").SetBounds(x,y,687,387)
End If
[此贴子已经被作者于2015/7/25 14:52:29编辑过]