>>>Hi,
>>>
>>>Can you programmatically close a modal form when a user clicks anywhere outside the form?
>>>
>>>TIA
>>
>>Try the question the other way around.
Is there any event that fires if you click outside a modal form? Try SET EVENTTRACKING and the stuff around. If you see an event firing you might use this, if not, then not.
>>
>>Note, clicking outside means clicking outside the form
inside VFP as well was as
outside, what is different.
>
>I have never done eventtracking. So, this is another thing to learn and expose the app to possible errors. If I cannot programatically close the form, I will have to give the customer a Cancel or Close button.
>Thank you.
It's a simple command. Just for testing, create a numb modal form, place eventtracking commands in it's init, you might see it in debuggers debugoutput or send to file
Close eventtracking in the forms destroy.
While the form is open, click outside on several areas. Close the form with the usual ways to close a form.
Now inspect the file / debugoutput
You might raise the eventtracking from debugger too, if you do so do not include the MouseMove event, it's like hell
I prefer ok/cancel buttons over of the new style just-close approach, because its more clear - and I can cancel out.
You can always close a form over the items on top bar, or catch ESC or the like.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]