Advertisement
6_2008-2009 Miscellaneous #195089

Is Form Loaded?

This function will tell you if your form is loaded (instantiated) or not. If you use the form's "Visible" property to determine this, the form is instantiated if it's not already loaded. This results in the form's "Load" event being executed unnecessarily. This function has none of the above overheads...

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Public Function IsLoaded(sForm As String) as Boolean
Dim Frm As Form
 
' Loop through the Forms collection looking
' for the form of interest...
 For Each Frm In Forms
 If Frm.Name = sForm Then
  ' Found form in the collection
  IsLoaded = True
  Exit For
 End If
 Next
End Function
Original Comments (3)
Recovered from Wayback Machine