checking if the form is opened or not

almaha

Member
Joined
Aug 11, 2010
Messages
7
Programming Experience
Beginner
Hi
I have question regarding how i can check if the form is opened or not ??
 
every once in a while I also need that.
Most my projects I do what kulrom suggested but in a function:
VB.NET:
    Public Function IsFormOpen(ByVal FormName As String) As Boolean
        Dim frm As Form

        IsFormOpen = False

        For Each frm In My.Application.OpenForms
            If frm.Name = FormName Then
                IsFormOpen = True
                Exit For
            End If
        Next
    End Function
 
Back
Top