Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moved event before Init()?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00617898
Message ID:
00618067
Views:
13
>>>Is it normal for the Moved() event to execute before or after the Init() at form startup, or is one of the property values causing this?
>>>
>>
>>I dont know if its normal, but why dont you put your code to save the position in the destroy or unload event? This will occur only one time when the form will be released and not at each move of the form (including the one in the init)...
>>
>>Just my 2c :-)
>
>Thanks Yes, that's what I should have done and will do.
>
>Still, the Moved() event at form startup sure seems strange.
>
>Thanks Gerald

I have do a simple test. I have put a [wait window "moved" nowait] in the moved event of a form. When I run the form, the wait window do not show until I move the form by its title bar.

I suspect that it was your code that move the form during the init.
When you change the value of Top or Left to reposition the window to the last position, your code in the moved event override the last position with the current (at least one of the 2 params). If you change Top with the old Top, you override the old Left with the current Left (vice-versa).

All in all, the moved event will not be triggered without an implicit move manually or by code. :-)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform