Hi Ken,
My initial message didn't make it.
As I understand it you need an event that will only fire when a PageFrame's ActivePage changes. I think I know how to create such an event. We can use VFP6's Access method to create a new event, call it NewPage. I would use ActivePage_Assign, unfortunately it is a documented bug that it will not fire when the user clicks on a new page. Instead we can use an ActivePage_Access method. VFP6 accesses a property before it changes it and at least in my version (only have beta where I am now) the ActivePage_Access method fires reliably.
Anyway:
Create a subclass of PageFrame
Add a CurrentPage property and initialize it to 0
Add a NewPage method
Add an ActivePage_Access method:
IF NOT This.CurrentPage = This.ActivePage
This.CurrentPage = This.ActivePage
This.NewPage()
ENDIF
RETURN THIS.ActivePage
I have tested this on my machine with two instances of a form class that has an instance of the new PageFrame subclass and it's NewPage method is called if and only if the ActivePage changes. In particular switching from one form or app to another does not fire it.
HTH,
Ned Ames
Ned
Reality is.