Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Activate, BindEvents, and Modal forms
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01033957
Message ID:
01033977
Views:
19
While I can't speak the nature of the problem you are encountering as I've never seen it, I do wonder at your choice of events given the intention of the class. Wouldn't the form's resize event be a better event to bind to capture the height,width, and windowstate of the form. And the Show event be a better place to restore the form's settings?

>UPDATE:
>
>I found it was not my code that was running when switching back to the app. The form had a windowstate of 2 as the default and it is only maximized when the app does not have focus and is swtiched to after the form is displayed. This maybe a bug?
>
>So, my code never runs for this form. Is there anything different about modal forms where the activate does not fire?
>
>
>
>
>
>>I have a class that saves and restores a forms Height/Width/WindowState/... I drop on my forms. It works on most of my forms. In the init of the class is this line of code:
>>
>>BINDEVENT(THISFORM,"ACTIVATE",THIS,"SET_FORM_SIZE",1)
>>
>>
>>
>>I have a modal form that is created but the "SET_FORM_SIZE" code does not run when the form is created.
>>
>>The code does run if the application does not have focus (I'm working in another program) at the time the form is created. I'm not sure if the ACTIVATE is triggered when I switch back to the app. Also,if I let the form come up while my application has focus and switch to another app and then switch back it does not run the code, only when the form is created while I'm off doing something else.
>>
>>Any idea what could be happening?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform