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:
00383677
Vues:
48
>Hi Nick,
>
>>the form becomes visible and VFP comes up with an error "Cannot change modality of a visible form"
>
>The following works for me in VFP5 and VFP6/SP3 on Windows 2000. I can use the buttons to switch between modal and modeless. Does it work for you?
>
>Public oForm
>oForm = CreateObject("SwitchForm")
>oForm.Show()
>
>Define Class SwitchForm as Form
>	Add Object cmdModal as CommandButton With Caption="Modal"
>	Add Object cmdModeless as CommandButton With ;
>		Caption="Modeless", ;
>		Top = 50
>	Procedure cmdModal.Click
>		Thisform.Hide()
>		Thisform.Show(1)
>		Thisform.Show(2)
>	Procedure cmdModeless.Click
>		Thisform.Hide()
>Enddefine
>Christof

Hi Christof,
It works on NT4. It bombs if you have
* cmdModeless.Click
Thisform.Hide()
Thisform.Show(1)
Thisform.Show(2)
which I occasionally did while copying the code around.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform