Microsoft KB Archive/157359

= FIX: Resize Event Automatically Called in SubClassed PageFrame =

Article ID: 157359

Article Last Modified on 10/16/2002

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition

-



This article was previously published under Q157359



SYMPTOMS
The Resize event of a subclassed PageFrame is called automatically when the object is being instantiated.



WORKAROUND
One way to prevent the Resize method code from being executed where the object is being instantiated is by setting a public variable, or user- defined property, in the PageFrame Init event and checking the variable in the Resize event.



STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been fixed in Visual FoxPro 5.0a.



MORE INFORMATION
The Resize event of a PageFrame is called only if the Resize event is explicitly called from within the code. If not, the Resize event is not called automatically. The above symptom occurs in only a subclassed PageFrame.

Steps to Reproduce Behavior
 Create a PageFrame control in the Class Designer.  In the Resize event of the PageFrame control, put in the following line of code: WAIT WINDOW "Resize - PageFrame Class"   In the Init event of the PageFrame control, put in the following line of code: WAIT WINDOW "Init - PageFrame Class"  Save the Class. Create a form. Add the PageFrame class that you just created in Class Designer onto the form.</li> Save and run the form. The PageFrame Resize method fires as evidenced by the Wait Window "Resize - PageFrame Class" appearing.</li></ol>

Keywords: kbbug kbfix kbvfp500afix kbprogramming KB157359

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.