>You shouldn't call object events. If you need to execute code from different places move it to a form method.
>
>>
>>I am aware of form closing event sequence Release->Destroy->Unload, when codes calls form.release() programmatically.
>>
>>I did a simple test which involves several command buttons. When I click button1, it calls button2.Click() and button2.Click() calls button3.Click()... till buttonN, where it simply runs THISFORM.Release() at the end.
>>
>>And I notice that if THISFORM.Release() is executed in a method at N level of call stack, then the next event Destroy will only be started after the call stack is cleared (i.e.it has to first RETURN N times to the button1 before the closing event sequence continues).
>>
>>Is my test observation correct and always true?
>>Anyone knows of any exception to the above?
I don't mean to call object event here :) (that is why I say it was a simple test)
I did that just to make sure the form release is triggered few levels down the call stack,
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only