Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form is not active on the second call
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01249847
Message ID:
01250192
Views:
14
Hi again Christof,

I found why I needed this code after I removed it. I have a pageframe class with 0 pages (this is because I want to be able to use my own names for page1 and page2).

The pageframe probably has a bug, which I believe now I already discussed here a while ago (even with Borislav or with Fabio, don't recall right now). If you place a pageframe based on this class on a form, set number of pages to 2, the ActivePage is set to 1 (not in bold and you can not change it).

UPDATE. I found a simple way to change it (the idea came to me while I was writing this message). I set it to 2, then back to 1 (it becomes bold now), and now the original problem wich pageframe coming without active page is not occurring.

Ok, I'll see if the form's problem is still there, I disabled tooltip on the first page.

UPDATE2. Seems like the problem is still there.

>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.
>
>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.
>
>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.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform