>Hi all,
>
>Is there some way to prevent the overhead of loading a page of a pageframe other than by adding the objects the first time the page is selected.
>
>I have a pageframe with some 14 pages, some of which are not available if certain modules have not been installed. I would just like to be able to delete the unavailable pages as necessary in the Load event but at that stage the pages don't yet exist, but if I wait till the Init method then the pages and all their objects will have been initialised, so....
>
>Is there some other way of achieving this?
How about building the pageframe with only the pages which are always there, and then conditionally adding the optional pages - until we get vfp8, you can subclass the page class in a .prg, and have it load the container with controls on first activate. Thus, your pageframe loads with the minimal number of pages, .newobject()s the applicable optional pages, and these pages load their content when activated. You'd need one class for loadable pages, and then subclass this for each of the pages you want.