S
Sam
Hi,
I have a mdi application in which it is only possible to open one form
at a time. To achieve this I have:
Public Class clsForms
Public Shared frm As Form
End Class
and then when I open a new form:
If Not form Is Nothing Then
If Not clsForms.frm Is Nothing Then
clsForms.frm.Close()
clsForms.frm = Nothing
End If
clsForms.frm = form
clsForms.frm.MdiParent = Me
clsForms.frm.Show()
clsForms.frm.Focus()
End If
It works fine except when I open a pop-up form from the toolbar of the
main form. When i do that, then if I try to open another form after i
closed the pop-up, clsForms.frm is not closed and i end up with having
multiple forms opened.
What is the problem with these pop-up (modal form) ?
I have a mdi application in which it is only possible to open one form
at a time. To achieve this I have:
Public Class clsForms
Public Shared frm As Form
End Class
and then when I open a new form:
If Not form Is Nothing Then
If Not clsForms.frm Is Nothing Then
clsForms.frm.Close()
clsForms.frm = Nothing
End If
clsForms.frm = form
clsForms.frm.MdiParent = Me
clsForms.frm.Show()
clsForms.frm.Focus()
End If
It works fine except when I open a pop-up form from the toolbar of the
main form. When i do that, then if I try to open another form after i
closed the pop-up, clsForms.frm is not closed and i end up with having
multiple forms opened.
What is the problem with these pop-up (modal form) ?