* PageClass.prg DEFINE CLASS MyPage AS Page FUNCTION Activate Wait window "I am active" ENDFUNC ENDEFINENow use that class;
* some code in the form WITH Thisform.PageFrame .NewObject("MyNewPage","MyPage","Pageclass.prg") WITH .MyNewPage .Caption = "Hello a new page" ENDWITH ENDWITHNow the pageframe in the form will have a new page added and that page will show the wait window when it is activated.