VB中,如何使一个窗体能够在另一个窗体上显示?“意思是,这个窗体在另一个窗体内?”等答案,成功必采

2024-11-22 08:07:46
推荐回答(4个)
回答1:

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

回答2:

回答3:

给你一个示例 忘采纳

回答4:

专业点,叫MDI窗口