G
Guest
Hi Everyone,
I'm looking for a way to make sure that only one instance of a form is
loaded. I have tried the following:
Private Sub mnuPatients_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles mnuPatients.Click
try
if not ifrmPatients is nothing then
exit Sub
End If
cursor = cursors.WaitCursor
ifrmPatients = new frmPatients
ifrmPatients.MdiParent = me
ifrmPatients.Show
cursor = cursors.Default
Catch ex As Exception
msgbox(ex.Message )
End try
End Sub
That didn't seem to work by itself. In the Closed event of the child forms
I even tried to force a Dispose, but that don't seem to get rid of the
reference. ANy ideas.
THanks.
Michael
I'm looking for a way to make sure that only one instance of a form is
loaded. I have tried the following:
Private Sub mnuPatients_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles mnuPatients.Click
try
if not ifrmPatients is nothing then
exit Sub
End If
cursor = cursors.WaitCursor
ifrmPatients = new frmPatients
ifrmPatients.MdiParent = me
ifrmPatients.Show
cursor = cursors.Default
Catch ex As Exception
msgbox(ex.Message )
End try
End Sub
That didn't seem to work by itself. In the Closed event of the child forms
I even tried to force a Dispose, but that don't seem to get rid of the
reference. ANy ideas.
THanks.
Michael