PUBLIC oform1 oform1=NEWOBJECT("form1") oform1.Show RETURN DEFINE CLASS form1 AS form Height = 333 Width = 375 autocenter = .T. ADD OBJECT container1 AS container WITH ; Top = 10, ; Left = 104, ; Width = 200, ; Height = 60, ; Visible = .F., ; Name = "Container1" ADD OBJECT command1 AS commandbutton WITH ; Top = 8, ; Left = 6, ; Height = 27, ; Width = 84, ; Caption = "click", ; Name = "Command1" ADD OBJECT pageframe1 AS pageframe WITH ; PageCount = 2, ; Top = 86, ; Left = 106, ; Width = 241, ; Height = 112, ; Visible = .F. ADD OBJECT command2 AS commandbutton WITH ; Top = 92, ; Left = 12, ; Height = 27, ; Width = 84, ; Caption = "click", ; Name = "Command2" PROCEDURE Init this.container1.Addobject("text1","textbox") this.container1.text1.Visible = .T. this.pageframe1.page1.Addobject("text1","textbox") this.pageframe1.page1.text1.Visible = .T. PROCEDURE command1.Click thisform.container1.setfocus && this don't check the Container1.Visible status ENDPROC PROCEDURE command2.Click thisform.pageframe1.page1.Text1.SetFocus && this don't check the pageframe1.Visible status ENDPROC ENDDEFINE