Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form status
Message
 
À
20/09/1999 09:00:06
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Titre:
Divers
Thread ID:
00266664
Message ID:
00266677
Vues:
21
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform