>>>>Also, any .SetFocus() will activate the form.Just put a breakpoint in the .activate and look up the call stack in the debugger, and you'll catch it.
>>>
>>>No SetFocus() at all. But definitely the form.activate is firing before the form.load. What could it be?
>>
>>Just put Set Step On in .activate and play Sherlock up the call stack. The only thing that may fire before form.load is something in the DE, so I think you'll find your suspect there.
>
>Thanks for your answer. I placed a SET STEP ON in BeforeOpenTables and from there it jumps immediately to form.activate ! No stop anywhere else. I havent found a SetFocus anywhere in the class hierarchy. What could it be ? I am using VFP8, but the same problem occurs with VFP7. Thanks.
That's weird. Seems like behavior induced by an automatic reaction to some property value somewhere... really weird. And hard to track. I've had a few things like that, they're extremely tricky to find, and usually have hard to find, but simple solutions - if that's any comfort.
Anyway, I said to put step on in the activate itself, just to see what's the code which leads there. Also, that would be a good moment to put thisform into the watch window and check if it has any members at the moment. AFAIK, it should have none yet (except the DE), so any object you find may be suspect. Is there any code in DBC events?