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:
00383481
Vues:
56
Hi Christof,

>Hi Nick,
>
>>I meant that you can make form Modal on the fly conditionally
>
>Graeat idea and a cool tip!
>
>>this works , but I am testing this now and having troubles with returning to modeless state.
>
>Because you never return to the first method. What happens is that Show(1) is executed and termination halts here (it's a modal form). The form doesn't become modeless, until it returns to the line after Show(1).

That's what I figured.


The second code snippets hides the form, but immediately shows it again, though at this point the form is still modal. Since a modeless form displayed from a modal form automatically becomes modal, as well, nothing seems to happen. However, if you write it this way:
>
>If Thisform.lAddMode
>   Thisform.Hide()
>   Thisform.Show(1)
>   Thisform.Show(2)
>Endif
>and then use Thisform.Hide() to make the form modeless again, it works.

Actually

Thisform.Show(1)
Thisform.Show(2)

does not work in my tests, because after the

Thisform.Show(1)

the form becomes visible and VFP comes up with an error "Cannot change modality of a visible form"
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform