Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Close form with close button instead of X
Message
From
08/02/2010 10:55:53
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01448035
Message ID:
01448068
Views:
77
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform