Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you insure you run only one instance of a form?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00256254
Message ID:
00256270
Vues:
27
>Application:
>Multiple forms run within a top level form. Each form is invoked by a menu which runs within the top level form. Config.fpw has application.visible = .F.
>
>Question:
>How can I insure that only one instance of each form can be invoked. I do want the user to be able to be using a second form at the same time.
>
>Alternatives thought about:
>Grey out the menu selection after it is selected, reactivate after the form is closed.
>
>Thanks.
Hi Jeff,

Your are able to use a collection of forms object reference.

So when the user hit a form menu

You check in the collection.

If a form instance exist it is easy to bring the form on top otherwise you are able to run the form for the fisrt time.

The check can also be done in the init code of the form and scan a VFP collection. ( I don't know if it is possible to use the Controls array in a form to locate children forms ? )

Marcel
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform