How can i know when the user clicked the closable button.
I would like to put a messagebox whenever the user click the close button in the form.
Thanks in advance. Please advice.
If you're referring to the little box in the upper right-hand corner with an 'X' in it, or the 'Close' selection from the menu, modify Mike's code something like this, and put it in the QueryUnload event of the form:
IF messagebox("Are you sure you want to close this?",36) == 6 &&... Yes selected
Thisform.Release
ENDIF
NODEFAULT
Dave S.
Rottdpogs,
perhaps it could be more simple to disable the close botton (closable=.f.) and use a classic "thisform.release" button, so you would be able to better manage the events.
Mmhhh.... I suppose that you already know this, but you can't choice this solution.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.