Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sorry to be such a Dullard!
Message
 
 
À
25/07/2010 20:03:28
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01473802
Message ID:
01473815
Vues:
58
>>>>>How do you close one modeless form from another modeless form?
>>>>>
>>>>>Do form NewForm name New
>>>>>
>>>>>.... then what?
>>>>>
>>>>>Thanks,
>>>>>
>>>>>dg
>>>>
>>>>New.Release()
>>>
>>>
>>>Thank you! Hadda brain lock.....'errrr something locked ;)
>>>
>>>dg
>>
>>
>>Still gotta lock.... Object New is not found????
>
>Looks like variable got out of scope. Instead of a variable, use a property. I'll call it "otherform".
>
>From form 1:
>
>
>ThisForm.AddProperty("otherform")
>do form ... name ThisForm.OtherForm
>* If that doesn't work:
>do form ... name Temp
>ThisForm.OtherForm = Temp
>
>
>Later, to close it:
>
>ThisForm.OtherForm.Release()
>
>
>Note that you can also do other manipulation with the other form, such as hiding or showing it, changing the .Width and .Height, etc.
>
>HTH,
>
>Hilmar.

Using this technique you would not be able to close form1 without first closing form2.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform