Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question about handling Forms
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00191274
Message ID:
00191333
Vues:
20
>CLEAR EVENTS
>FOR x=1 TO _SCREEN.FormCount && This loop could be FOR EACH oFrm in _SCREEN.Forms like David's
> _SCREEN.Forms[m.x].Release
>ENDFOR
>DO CloseData && Closes tables opened at main.prg start
>DO ResetEnvir && Resets SET commands for my development preferences
>RETURN
>Cheers,

Rich,

Both your and Dave's code will fail under certain situations. For example, when three forms are open;

Your code will close form 1, then advance to form 2, hwoever after form 1 closes form 2 is now 1 and 3 is now 2. You close the enw form 2 and then advance to form 3, the problem now there is no form 3 to close and you get an error or at least leave form 3 open. Instead the call to the release in your code should always do _screen.forms(1).Release(), as the forms will advance in the forms collection as they are closed.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform