Visual Basic 6 Form
3 answers
You must distinguish between Loaded and Visible .
- For visiblility, just check the property
Visible
(noting that doing this for an unloaded form will load it). -
Unfortunately, there is no property for the loading state. You have to loop over all the forms and see if your form is contained in the list of loaded forms:
Public Function IsFormLoaded(FormToCheck As Form) As Boolean Dim F As Form For Each F In Forms If F Is FormToCheck Then IsFormLoaded = True Exit Sub End If Next End Sub
The global collection Forms
contains all currently loaded forms.
+7
source to share