>>This is why I asked the question so that I can avoid the "bite me later on" thing. What you are saying makes sense.
>>And I realized that what I need to do is to change the code in my Activate method and call form.Refresh() only when user actually changed from one page to this page. But if this page Activate fires simply because the form gets focus back, the form.Refresh() should not be called.
>>Thank you.
>
>Another option is to add a custom property to a page ("PageX"), named something like .NeedsRefresh, with a logical value. If changes on another page (or anywhere else, for that matter) require a refresh of PageX, it can set PageX.NeedsRefresh = .T.
>
>The code that refreshes PageX has PageX.NeedsRefresh = .F. at its bottom.
>
>PageX.Activate() only calls the refresh code if .NeedsRefresh = .T.
I was thinking about the "form gets focus back", in the same way. When form loses focus (i.e. in .deactivate()), set a form.needsrefresh=.f. (but set it when recno() changes and in other situations when it really needs it), so when in .activate() check for that property and call .refresh() if it's true. I think I've actually seen this somewhere in use.