>>I might be missing the point too, but if you suggest to duplicate the same code,
>>why not create a method with that code and just call it from Activate and Load?
>>Just an observation. But I think if Michel clarifies what exactly is going on, we
>>might come up with a workaround at least...Come on, Mich, tell us :) I kind of
>>missed the whole problem :(
>
>The main focus is to execute the code in the Activate() because this is the code being executed when we move from one form to another. I can't put this code elsewhere because it will not be executed as the Activate() is.
>
>In my app, I have multiple forms at the same time on the screen and the user can move to another one without closing it.
OK, I see the point. It might seem primitive, but I would do the following:
I understand that there is quite a bit of various settings code stuffed into Activate(),
so that when the user starts doing 'finger-excersises' wth the mouse, not all the code
gets executed or its execution becomes sporatic...OK, then create a property
and initialize it at design to .F. (it'll do it anyway), then at the top of the Activate()
check for its value. If .F., then re-execute the code, else - Return. At the end of the
Activate() set it to .T. On LostFocus() set it to .F. You can also minimize the time
for doubleclicks, so that when the user goes crazy, the system will not interpret his
clicks as single clicks, but will take them as DblClick. Does it all make sense? :)
Some things are better be left unknown...NOT!!!