loForm = Createobject('myForm') loForm.Show(1) define class myForm as Form add object myPageFrame as myPageFrame with Left=0, Top=0, width=250, height=200 add object myButton as myButton with left = 251, width=100, Top=0, height=24, caption='Activate Page 2' enddefine define class myPageFrame as PageFrame add object myPage1 as myPage add object myPage2 as myPage add object myPage3 as myPage add object myPage4 as myPage function init() as Boolean this.myPage4.PageOrder = 2 && solo para demostrar endfunc enddefine define class myPage as Page add object myText1 as myText with top=10, left=0, width=100, height=24, backcolor=Rgb(0,0,255) add object myText2 as myText with top=44, left=0, width=100, height=24, backcolor=Rgb(0,255,0) procedure activate * wait window this.Name + ' activated' nowait this.Refresh() this.myText1.SetFocus() endproc enddefine define class myButton as CommandButton procedure click thisform.myPageFrame.ActivePage = thisform.myPageFrame.myPage2.PageOrder endproc enddefine define class myText as TextBox && or EditBox procedure GotFocus() wait window this.Parent.Name + [.] + this.Name + ' got focus' nowait endproc enddefine