Private WithEvents frm As Form
Private Sub Form_Activate()
On Error Resume Next
frm.Move Me.Left, Me.Top
frm.Show
End Sub
Private Sub Form_Load()
Set frm = New Form2
frm.Show
End Sub
Private Sub Form_Resize()
On Error Resume Next
frm.Move Me.Left, Me.Top
frm.Show
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload frm
Set frm = Nothing
End Sub
Private Sub frm_Resize()
On Error Resume Next
frm.Move Me.Left, Me.Top
frm.Show
End Sub
给你一个示例 忘采纳
专业点,叫MDI窗口