Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Prevent form re loading
Message
 
 
À
10/02/2002 10:13:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00618011
Message ID:
00618074
Vues:
23
>Hi
>
>what is the best way of preventing a form being loaded more than once. SO if a copy of its already open I don't want another.
>
>
>Nick Mason

You can check Forms collection. Something like
llFormIsRunning = .F.
For Each loForm IN _Screen.Forms
  IF loForm.Name = < the name of the form to run >
      * the form is running alreday
     llFormIsRunning = .T.
     loForm.Show()
     Exit
  ENDIF
Endfor

If Not llFormIsRunning 
  DO Form < the name of the form to run > 
Endif
You can also create a form manager in your application object an let it handle that.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform