Public Sub openRecForm(ByVal frm As Form, ByVal midfrm As Form)
Dim recFld As Form = frm
Dim f As Form = Application.OpenForms(recFld.Name)
If f IsNot Nothing Then
If Not recFld.IsDisposed Then
recFld.WindowState = FormWindowState.Normal
recFld.BringToFront()
Else
recFld = New Form
recFld = frm
recFld.MdiParent = midfrm
recFld.Show()
End If
Else
recFld = New Form
recFld = frm
recFld.MdiParent = midfrm
recFld.Show()
End If
End Sub
|