Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Private Datasession Two or More Forms - Close First Form
Message
De
25/05/1999 15:55:04
 
 
À
25/05/1999 15:33:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00222633
Message ID:
00222647
Vues:
23
You could create a property in the primary form, say NbRef, and initialize it at zero. When each form using the primary's form datasession is created, increment the property by one. When they are released, decrement it.

In the QueryUnload() of the primary form, if NbRef > 0, issue a NODEFAULT.

BTW, why are you using the same datasession?

>The user usually has a primary pageframe displayed because it contains client information, telephone log, shipping,etc. This form is set to private datasession.
>
>The user can select other forms: Work In Progress, invoices, payments, etc. If the primary form is open, the other form opens using primary's datasession...if not, it uses default.
>
>The problem is, the user accidently closing the primary form when its datasession is being used by a second form.
>
>How can I prevent this from happening?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform