Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Prevent User From Leaving Form
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00383396
Message ID:
00383729
Vues:
28
Mark,

How about moving the modality condition to the start of the problem? make the form modal or not when it first instantiates based on the condition.

>>
>>How about making the form Modal?
>
>Nope. Can't do that. Re-read my entire problem. Actually I have found a clever solution. When the condition exists where I have to simulate a modal form, I change the form's AlwaysOnTop property to true. The problem was the Deactivate was firing twice -- once when the user clicks on another form and once because of the messagebox. In the Deactivate, I put:
>if This.lAddMode
>	if empty(This.Tag)
>		This.Tag = "NOMSG"
>		MessageBox('You must first complete or cancel the addition of the new record.', MB_ICONEXCLAMATION, "Warning...")
>		This.Show()
>	else
>		This.Show()
>		This.Tag = ""
>	endif
>else
>	DoDefault()
>endif
>This is kind of a kludge, so I am open for more elegant options.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform