>VFP form event sequences

>-When A Form Getting Loaded:
1. DataEnvironmet.openTables()
2. DataEnvironmet.beforeOpenTables()
3. Form.load()
4. [cursurs].Init() – for each cursor in DataEnvironment
5. DataEnvironment.init()
6. [controls].init() – for all controls in a form
7. Form.init()
8. Form.show()
9. Form.activate()
10. Form.refresh()
11. [object1].when() – for the first object in tab order
12. [object1].gotFocus() – for the first object in tab order

But In MSDN There Is A Slight Difference:
1. Form.init()
2. Form.activate()
3. [object1].when() – for the first object in tab order
4. Form.gotFocus()
5. [object1].gotFocus()
6. [object1].message()

-If We Leave An Object And The Next Object Gets The Focus:

Whenever An Object Gets The Focus The Sequence Of The Events Is As Below:
1. [object(i)].when()
2. [object(i)].gotFocus()
3. [object(i)].message()

And Whenever An Object Loses The Focus The Sequence Would Be:
1. [object(j)].valid()
2. [object(j)].lostFocus()

-If We Move To The Next Text Box From Currently Focused Text Box And Type Something In The Next Text Box:
1. Text(i).keyPress()
2. Text(i).valid
3. Text(i).lostFocus
4. Text(i+1).when()
5. Text(i+1).gotFocus()

-When We Type In A Text Box:
1. Text(i).keyPress()
2. Text(i).interactiveChange()

-When We Leave A Form By Calling Realease() Method (Closing The Form):
1. Form.queryUnload()
2. Form.destroy()
3. Form.[command buttons].destroy()
4. Form.[objects].destroy()
5. Form.unload()
6. DataEnvironment.afterCloseTables()
7. DataEnvironment.destroy()

-When We A Form Loses Focus (Like When Another Form Get The Focused):
1. Form.lostFocus()
2. Form.deactivate()

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s