MS KB article Q157359 describes a problem with the Resize event of a subclassed pageframe firing at instantiation time in VFP 5. It says this was fixed in VFP 5a.
I am seeing a related problem in a form developed in VFP6 SP3. The form was originally developed with a subclassed pageframe which has 2 pages as default. There is code in the Resize of the pageframe which references objects in containers on the pages. This has been working properly. I then added a third page to the pageframe through the IDE by setting PageCount to 3. Running this form results in errors because the Resize of the pageframe is firing at instantiation time and trying to reference as yet non-existent objects. This was verified in the debugger. I have worked around the problem by adding a property to the subclassed pageframe and testing in the pageframe Resize event to not fire the code at this point ... but I don't like it. :-)
I tried subclassing a pageframe with 3 pages but this exhibited the same behavior when used on the form. I also tried a quick, simple test case from scratch but it did not show the problem. Since it was a quick and dirty test, I don't know if I haven't sufficiently duplicated the real scenario or if it's just me. I will try to test more when I have a chance.
I have found nothing in the MS KB for VFP6 on this. Has anyone else seen this and/or am I missing something here?
Thanks,
Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.