Microsoft KB Archive/134879

= Objects Are Refreshed in the Order They Were Added to the Form =

Article ID: 134879

Article Last Modified on 2/15/2000

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition

-



This article was previously published under Q134879



SUMMARY
When you add objects to a form, the objects are referenced in the order they were added to the form. Therefore, a refresh causes the objects to be refreshed in the same order they were added to the form. It is not possible to alter this order from the form itself, other than by removing the objects and placing them back onto the form in the order desired.



Steps to Demonstrate Behavior
 Create a new form in Visual FoxPro. Add 2 text boxes and a command button.  In the refresh method for Text1, enter this code: WAIT WINDOW "Refresh method for text1"   In the refresh method for Text2, enter this code: WAIT WINDOW "Refresh method for text2"   In the click event of the command button, add this code: Thisform.refresh  Run the form. You will see the WAIT WINDOW for Text1 fire, then the WAIT WINDOW for Text2 fire. Click the command button and the WAIT WINDOWs appear in the same order again (Text1 then Text2). Modify the form, and click the Text1 box. Select the edit menu and choose cut, or press CTRL+X. The Text1 box disappears from the form.</li> Select edit and paste, or press CTRL+V. The Text1 box reappears.</li> Run the form again, and notice that the refresh events of the text boxes fire differently now (Text2 then Text1).</li></ol>

It is possible to modify the .SCX file, and move records around to affect the order that objects are refreshed. The memo field "objname" in the .SCX file contains the names of the objects. Moving the records containing the objects on the form affects the refresh order.

Additional query words: 3.00 VFoxWin

Keywords: KB134879

-

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

© Microsoft Corporation. All rights reserved.