|
那你可以在窗体的调整事件中,先把桌面的宽,长找出来,就把作决定.
如:
Private Sub Form_Resize()
On Error Resume Next
Dim lngWidth As Long, lngHeight As Long
'控件宽度位置调整
lngWidth = Me.WindowWidth
lngHeight = Me.WindowHeight
Me.barTool.Width = lngWidth + 40
Me.subForm.Width = lngWidth - Me.subForm.Left
Me.staBar.Width = lngWidth + 50
'空间高度位置调整
Me.staBar.Top = lngHeight - Me.staBar.Height + 50
Me.subMenu.Height = Me.staBar.Top - Me.subMenu.Top - 10
Me.subForm.Height = Me.subMenu.Height
Me.barSplit.Height = Me.subMenu.Height + 40
'触发子窗体调整大小事件
Me.subForm.Form.Form_Resize
Me.subMenu.Form.Form_Resize
End Sub
|
|