I have 2 forms in 1 MDI form, I want the 2nd form check the 1st form is it already open or not ..? how to do that ?? any body can help me please ?, by the way I have try the following codes:
in my module1.bas:
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
in my 2nd form:
Dim winHwnd As Long
Dim RetVal As Long
is_it_open = FindWindow(vbNullString, "Calculator")
Debug.Print winHwnd
If is_it_run = 0 Then
MsgBox "The form is not open"
End If
the above codes is running well, if I set False for MDIChild for the 1st form.
thanks for any advice or suggestion
Winan
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement