Firing Sequence of Visual FoxPro Events

This article was previously published under Q136690
This article has been archived. It is offered "as is" and will no longer be updated.
This article shows the general firing sequence of Visual FoxPro events. Formore information, please search for the "Visual FoxPro Event Sequence"topic in the Visual FoxPro Help file.

There can be an infinite number of potential user interaction scenariosthat will generate specific event sequences. An easy way to observe theorder is to include the following lines of code in the events you areinterested in:
For a description of event sequences in a simple user interaction scenario,please see Chapter 4 of the Visual FoxPro "Developer's Guide." For adetailed look at Visual FoxPro event sequences, run from theVfp\Samples\Controls directory, select "See Event Firing Sequences" in theExamples list, and choose Run Example.

The data environment's AutoOpenTables property is assumed to be set to true(.T.). Other events can occur based on user interaction and systemresponse.
Object                            Events--------------------------------------------------Data environment                  BeforeOpenTablesForm set                          LoadForm                              LoadData environment cursor(s)        InitData environment                  InitObjects  (1)                      InitForm set                          ActivateForm                              ActivateObject1  (2)                      WhenForm                              GotFocusObject1                           GotFocusObject1                           MessageObject1                           Valid  (3)Object1                           LostFocusObject2  (4)                      WhenObject2                           GotFocusObject2                           MessageObject2                           Valid  (3)Object2                           LostFocusForm                              QueryUnloadObject  (5)                       DestroyForm                              UnloadForm set                          UnloadData environment                  AfterCloseTablesData environment                  DestroyData environment cursor(s)        Destroy(1) For each object, from innermost object to outermost container(2) First object in the tab order(3) As the object loses focus(4) Next object to get focus(5) For each object, from outermost container to innermost object				

Article ID: 136690 - Last Review: 02/28/2014 07:58:28 - Revision: 1.1

  • Microsoft Visual FoxPro 3.0 Standard Edition
  • kbnosurvey kbarchive KB136690