以下是引用sdta在2018-6-22 01:37:34的发言:
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
图片附件: 游客没有浏览图片的权限,请
登录 或
注册
图片附件: 游客没有浏览图片的权限,请
登录 或
注册
我把这段代码放在表单中,结果是这样的。