Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closing a modal form
Message
 
 
To
27/05/2023 10:39:32
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01686646
Message ID:
01686662
Views:
43
>>Hi,
>>
>>Can you programmatically close a modal form when a user clicks anywhere outside the form?
>
>Shouldn't form's .deactivate() event fire then?

When making the form modeless, clicking outside the form indeed closes the form. And I can determine that the form .deactivate is called.
Do you suggest to set the form reference to NULL in deactivate()? So that not to have what I believe is called "dangling" references?

UPDATE. The code that runs upon a user clicking on a button of the menu form, is based on the form tag value. That is, the tag is set to '1' when user clicks on the 1st button, and so on.
Now, when the form is deactivated, the value of Tag is gone.
How do I pass the value of selected button to the called method?
"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
Next
Reply
Map
View

Click here to load this message in the networking platform