Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Close form with close button instead of X
Message
 
 
À
08/02/2010 10:55:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01448035
Message ID:
01448071
Vues:
67
As Boris said, QueryUnload is only called when you try to close the form with the X at the top. May be instead you want to try to bind RELEASE method of the form ?

>somebody provided me following codes, but those do not work
>
>Pleaes modify
>
>
>Maybe bindevent can help you.
>The idea is to write your own handler for queryunload and bind to your forms.
>
>*
>* in your main.prg add handler to each form
>*
>for each m.form in _screen.forms
> do myHandler with m.form
>endfor
>
>
>*
>* myHandler.prg
>*
>para oForm
>private o
>m.o=createobject("myHandler")
>=addproperty(m.oForm,"__handler", m.o)
>=bindevent(m.oForm,"queryunload",m.o,"doQueryUnload")
>
>define class myHandler as session
> datasession=1
>
> function doQueryUnload
> =messagebox("Please press close button to exit",_screen.ActiveForm.caption)
> nodefault
>enddefine
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