回复 楼主 tjdeming
你的出现什么错误?我测试是正常的啊PUBLIC oform1 oform1=NEWOBJECT("form1") oform1.Show RETURN DEFINE CLASS form1 AS form Top = 88 Left = 85 Height = 229 Width = 509 DoCreate = .T. Caption = "Form1" Name = "Form1" ADD OBJECT pageframe1 AS pageframe WITH ; ErasePage = .T., ; PageCount = 4, ; Top = 108, ; Left = 36, ; Width = 444, ; Height = 104, ; Name = "Pageframe1", ; Page1.Caption = "Page1", ; Page1.Name = "Page1", ; Page2.Caption = "Page2", ; Page2.Name = "Page2", ; Page3.Caption = "Page3", ; Page3.Name = "Page3", ; Page4.Caption = "Page4", ; Page4.Name = "Page4" ADD OBJECT text1 AS textbox WITH ; Alignment = 3, ; Value = 0, ; Height = 25, ; InputMask = "", ; Left = 97, ; Top = 12, ; Width = 96, ; Name = "Text1" ADD OBJECT label1 AS label WITH ; AutoSize = .T., ; Caption = "输入编号", ; Height = 16, ; Left = 24, ; Top = 20, ; Width = 50, ; Name = "Label1" ADD OBJECT combo1 AS combobox WITH ; RowSourceType = 1, ; RowSource = "202301,202302,202303,202304,202305,202306,202307,202308,202309,202310,202311,202312", ; Height = 25, ; Left = 96, ; Top = 60, ; Width = 97, ; Name = "Combo1" ADD OBJECT combo2 AS combobox WITH ; RowSourceType = 1, ; RowSource = "202301,202302,202303,202304,202305,202306,202307,202308,202309,202310,202311,202312", ; Height = 25, ; Left = 276, ; Top = 60, ; Width = 97, ; Name = "Combo2" ADD OBJECT label2 AS label WITH ; Caption = "起始时间", ; Height = 13, ; Left = 24, ; Top = 65, ; Width = 61, ; Name = "Label2" ADD OBJECT label3 AS label WITH ; Caption = "终止时间", ; Height = 13, ; Left = 204, ; Top = 65, ; Width = 61, ; Name = "Label3" ADD OBJECT command1 AS commandbutton WITH ; Top = 36, ; Left = 432, ; Height = 25, ; Width = 61, ; Caption = "关闭", ; Name = "Command1" ADD OBJECT command2 AS commandbutton WITH ; Top = 16, ; Left = 332, ; Height = 25, ; Width = 61, ; Caption = "引用", ; Name = "Command2" ADD OBJECT command3 AS commandbutton WITH ; Top = 16, ; Left = 240, ; Height = 25, ; Width = 61, ; Caption = "引用2", ; Name = "Command3" PROCEDURE pageframe1.Click *!* PUBLIC nText,ST,ET, RIQI *!* *!* public 声明的变量要释放,不然表单关闭了,它们依然存在。 *!* nText= thisform.TEXT1.value &&此值本来就是0,跟上一句是重复的 *!* st = *!* et = *!* RIQI="J1,J2,J3,J4" *!* *!* *!* 注意到你对3个变量赋值 ENDPROC PROCEDURE INIT PUBLIC nText,ST,ET, RIQI Text= thisform.TEXT1.value st = = ="J1,J2,J3,J4" ENDPROC PROCEDURE pageframe1.Page1.Click * this.parent.click() thisform.pageframe1.page1.caption=STR(NTEXT) ThisForm.Refresh ENDPROC PROCEDURE pageframe1.Page2.Click * this.parent.click() thisform.pageframe1.page2.caption=st ThisForm.Refresh ENDPROC PROCEDURE pageframe1.Page3.Click * this.parent.click() thisform.pageframe1.page3.caption=ET ThisForm.Refresh ENDPROC PROCEDURE pageframe1.Page4.Click * this.parent.click thisform.pageframe1.page4.caption=ET+ST ThisForm.Refresh ENDPROC PROCEDURE command2.Click =str(ntext) ENDPROC PROCEDURE command3.Click =RIQI ENDPROC PROCEDURE command1.Click CLEAR MEMORY *!*退出前释放public申明过的变量 clear quit ENDPROC ENDDEFINE * *-- EndDefine: form1 **************************************************
[此贴子已经被作者于2023-9-2 23:31编辑过]