Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closing a modal form
Message
 
 
To
27/05/2023 08:37:31
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01686646
Message ID:
01686651
Views:
28
>>>>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.

Thank you very much. I will try what you suggest.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform