>>>Is there a setting that keeps track of the control that last had focus so that when you switch between pages on a page frame I can set focus to the control that had focus last rather than the page itself?
>>
>>Do you want to set focus on the first control on a page, when page gets activated?
>
>No, I want to set focus to the control that had focus when I left the page, so if I'm on one page and switch to another and switch back to the 1st page, the control that had focus when I left will have focus when I return!
I have feeling that your page may have additional property (i.e. it should be subclassed) to store ControlOnFocus. Any control of this page should have:
This.Parent.ControlOnFocus=This in its GotFocus event. Also, you would have to set This.ControlOnFocus=.NULL. in Page.Destroy event. At last, Page.Activate event will include This.ControlOnFocus.SetFocus
Edward Pikman
Independent Consultant