1.子窗体代码
Public Class FormToolbox
Private Shared ftb As New FormToolbox
Private Sub New()
InitializeComponent()
End Sub
Public Shared Function GetIntance() As FormToolbox
ftb.MdiParent = Form1.ActiveForm
If (ftb Is Nothing) Or ftb.IsDisposed Then
ftb = New FormToolbox
ftb.MdiParent = Form1.ActiveForm
End If
Return ftb
End Function
End Class
2.父窗体
Partial Public Class Form1
Private Sub 工具箱ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 工具箱ToolStripMenuItem.Click
FormToolbox.GetIntance.Show()
End Sub
End Class