Advertisement
6_2008-2009 Custom Controls/ Forms/ Menus #212821

IsLoaded Form Function

This Function checks if a specified Form is loaded by looping through the forms collection it returns TRUE if it is and FALSE if it is not you can decide what you want according to the return value e.g accessing its properties or methods or controls ,...

AI

AIサマリー: 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.

ソースコード
original-source
<B><FONT SIZE=1><P ALIGN="LEFT"> </P>
<P ALIGN="LEFT">Public Function IsLoaded(ByVal strForm As String)As Boolean</P><DIR>
<DIR>
<P ALIGN="LEFT">Dim frmloaded As Form</P>
<P ALIGN="LEFT">IsLoaded = False</P>
<P ALIGN="LEFT">If strForm = "" Then Exit Function</P>
<P ALIGN="LEFT">For Each frmloaded In Forms</P><DIR>
<DIR>
<P ALIGN="LEFT">If frmloaded.Name = strForm Then</P><DIR>
<DIR>
<P ALIGN="LEFT">IsLoaded = True</P>
<P ALIGN="LEFT">Exit Function</P></DIR>
</DIR>
<P ALIGN="LEFT">End If</P></DIR>
</DIR>
<P ALIGN="LEFT">Next</P></DIR>
</DIR>
<P ALIGN="LEFT">End Function</P></B></FONT>
オリジナルのコメント (3)
Wayback Machineから復元