Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleSee if a form with a given name is loaded
Keywordsform loaded, form type
CategoriesControls
 
The reason this is necessary is that you cannot easily look at the form itself. If you look at the form or its properties, that tends to load the form if it is not already loaded. Looking in the Forms collection does not involve the form in any way if it is not already loaded.

The IsLoaded function searches the Forms collection for a form with a given name.

 
' Return True if a form is loaded.
Public Function IsLoaded(ByVal form_name As String) As _
    Boolean
Dim frm As Form

    IsLoaded = False
    For Each frm In Forms
        If frm.Name = form_name Then
            IsLoaded = True
            Exit For
        End If
    Next frm
End Function
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated