PUBLIC oform1
oform1=NEWOBJECT("form1")
oform1.Show
RETURN
DEFINE CLASS form1 AS form
DoCreate = .T.
Caption = "Form1"
Name = "Form1"
ADD OBJECT text1 AS textbox WITH ;
Height = 20, ;
Left = 72, ;
Top = 60, ;
Width = 100, ;
Name = "Text1"
ADD OBJECT label1 AS label WITH ;
AutoSize = .T., ;
Caption = "", ;
Height = 16, ;
Left = 192, ;
Top = 60, ;
Width = 2, ;
Name = "Label1"
ADD OBJECT command1 AS commandbutton WITH ;
Top = 120, ;
Left = 72, ;
Height = 25, ;
Width = 60, ;
Caption = "下一个", ;
Name = "Command1"
PROCEDURE Init
create cursor tt (单词 c(10),中文 c(10))
insert into tt values ("China","中国")
insert into tt values ("people","人民")
go top
thisform.text1.value=单词
thisform.label1.caption=中文
ENDPROC
PROCEDURE command1.Click
select tt
skip
if not eof()
else
go top
endif
thisform.text1.value=单词
thisform.label1.caption=中文
ENDPROC
ENDDEFINE
[此贴子已经被作者于2018-6-22 01:39编辑过]