Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form status
Message
 
To
20/09/1999 09:00:06
General information
Forum:
Visual Basic
Category:
Other
Title:
Miscellaneous
Thread ID:
00266664
Message ID:
00266677
Views:
22
>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

Use the forms collection like this:
Dim x As Form

For Each x In Forms
Debug.Print x.Name
Next
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform