My application does exactly what you are talking about. I don't know how many pages or objects are loaded on the form until the form displays in front of me.
I use a table to contain a list of the Pages that I want added to the PageFrame. Each row in this table will contain an object and name to be defined. Programmatically when the PageFrame is added, the initialize loads the table info into a cursor, then cycles through the cursor and does a pageframe.ADDOBJECT(m.pagename, m.pageobject, parameterlist...)
Make sure you eliminate the default pages that are created for you.
m.pagename = "pgNames"
m.pageobject = "cpgfNames"
SCAN
SCATTER MEMVAR
THISFORM.pageframe.ADDOBJECT(...)
ENDSCAN
Now, where is the page defined.
Create a program called cusPages.prg
Add somewhere in main.prg a "SET PROCEDURE TO cusPages ADDITIVE" this will make it visible where ever you want.
Inside the cusPages.prg
#include ...
DEFINE CLASS cpgfNames AS PAGE
cProperty = ''
nProperty = 0
PROCEDURE init
THIS.cProperty = 'Whatever'
THIS.nProperty = 5
ENDPROC
PROCEDURE activate
ENDPROC
ENDDEFINE