Define class myPageFrame as pageframe Procedure init Lparameters tnPages This.pagecount=0 For ix=1 to tnPages This.addobject('page'+padl(ix,2,'0'),'myPage') Endfor This.setall('Visible',.t.) Endproc Enddefine Define class myPage as Page Procedure click Wait window nowait 'hello' Endproc Procedure rightclick Wait window nowait 'there' Endproc EnddefineCetin