>Hi Naomi,
>
>>IF thisform.pgfProblemsResolutions.Activepage = 0 && First time
>
>You need to fix this in the designer, not at runtime. Open the form and navigate to the pageframe. The ActivePage property is probably 1 in non-bold. Press enter to make it bold and force VFP to store the property.
>
Hi Christof,
The reason for this code is that I want the pageframe to start with 0 as an ActivePage. I forgot the exact reason for this right now.
>As for the behavior... I've seen weird things going on when the form became visible before Init completes. This happens when you call SetFocus of an object. That's why our base class has code in the SetFocus method that validates the calling stack for any Init method and issues a warning in this case.
>
Good point, but I try to never call SetFocus from the Init. Also why the problem is intermittent?
>Another candidate for causing problems is WAIT WINDOW while the form is not visible. Because the WAIT WINDOW is the first visible window, some Windows code treats this as the main window and sets the focus to this window. When the WAIT WINDOW is closed, the focus has already been transfered. hence, the actual form is not activated any more.
I think it's also not a case here, though I'll double check. I think it may be related to the fact I have a timer and another window activated for tooltips in the grid (remember I told you about the great class I downloaded from the Russian site?). I think there are some minor side effects such as this one...
I'll try to look closer for this form and also temporary disable tooltip to see if this is the culprit.
Thanks a lot for your ideas.
If it's not broken, fix it until it is.
My Blog