Simple API call that tells whether or not a particular form is open. Useful for managing popup forms or a series of forms.
Sample usage:
If FormIsOpen("Color Picker") Then
' ....Do Something Here
Else
' ...Do Something Else Here...
End If
Inputs
FormName
Assumes
Goes by form title, so multiple instances of a form can be used as long as their titles are different. Also works with other applications...any window in fact, so it is not limited to your VB forms.
Returns
Boolean. True=Form is open.
API DeclarationsPrivate Declare Function FindWindow Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName As String, ByVal _
lpWindowName As String) As Long