J
JeremyGrand
I'm trying to detect if a given mdi child is open in my app using the
following code in the main form (if it is open, I want to view it, not
create a new instance):
Public Function isOpen(ByVal frmName As String) As Boolean
Dim i As Int16
isOpen = False
For i = 0 To Me.MdiChildren.Length - 1
If DirectCast(Me.MdiChildren(i), Form).Name = frmName Then
isOpen = True
End If
Next
end
The problem is, this seems to detect the existence of dead forms.
Is there a way to do what I want?
following code in the main form (if it is open, I want to view it, not
create a new instance):
Public Function isOpen(ByVal frmName As String) As Boolean
Dim i As Int16
isOpen = False
For i = 0 To Me.MdiChildren.Length - 1
If DirectCast(Me.MdiChildren(i), Form).Name = frmName Then
isOpen = True
End If
Next
end
The problem is, this seems to detect the existence of dead forms.
Is there a way to do what I want?