Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Testing an open form
Message
 
À
06/09/2002 11:39:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00697561
Message ID:
00697568
Vues:
19
This message has been marked as the solution to the initial question of the thread.
Hi Nerissa,

>Is there a function that tests whether a form is open or not?

the most generic way would be to scan the _SCREEN.Forms collection and compare the names of the forms with the name you're looking for:
LOCAL loFoundForm, loForm
loFoundForm = .NULL.

FOR EACH loFORM IN _SCREEN.Forms
  IF UPPER(loForm.Name) == "MYFORMNAME"
     loFoundForm = loForm
     EXIT
  ENDIF
ENDFOR

IF NOT ISNULL(loFoundForm)
  *-- loFoundForm contains a reference to the found form
ENDIF
In MM you can also ask the MM Forms Collection:
loFoundForm = goApp.oForms.Get("MYFORMNAME")
IF NOT ISNULL(loFoundForm)
  *--
ENDIF
HTH,
Armin

Armin Neudert
Regional Director (Stuttgart) of German FoxPro User Group dFPUG

MCP for Visual FoxPro

Expert/Editor of the VFP section in the German Codezone community portal
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform