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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only