Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Prevent a Form loading?
Message
De
28/09/1999 18:16:38
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Prevent a Form loading?
Divers
Thread ID:
00270267
Message ID:
00270267
Vues:
55
I have a form which, in its init method, checks to see if the conditions exist which make it worth loading the form. If not, I don't want the form to continue loading. Trouble is, I can't seem to stop it!

I started with

if (condition)
(warn user that the form can't be loaded)
thisform.release
endif

after that failed I tried
if (condition)
(warn user that the form can't be loaded)
thisform.release
nodefault
endif

and then
if (condition)
(warn user that the form can't be loaded)
thisform.abandon && a property set up for this purpose
thisform.release
nodefault
endif

followed by these opening lines in both the load and activate methods

if thisform.abandon
thisform.release
nodefault
endif

I even tried setting the form visible to false and then only setting it true if the condition was met. Made no difference whatsoever.

They all yield precisely the same behaviour. The warning comes up for the benefit of the user, then the form displays regardless. I say 'displays' because the form refuses to react to any button pushing, as though it has been partially released. However, as it is 'alwaysontop' I can not then do anything with any other forms and am forced to crash the program to get rid of the damn thing.

Presumably I'm missing something elementary. Could someone please put me out of my misery!

Harry
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform