(1)新建一个表单,添加标签1个、选项按钮组1个、命令按钮组1个,布局好
(2)Init事件的代码
CLOSE ALL
IF FILE('cs.dbf')
USE cs.dbf
ENDIF
ThisForm.Refresh
(3)Refresh事件代码
ThisForm.Label1.Caption='第'+题号+'题:'+题目
ThisForm.OptionGroup1.Option1.Caption='A.'+选项A
ThisForm.OptionGroup1.Option2.Caption='B.'+选项B
ThisForm.OptionGroup1.Option3.Caption='C.'+选项C
ThisForm.OptionGroup1.Option4.Caption='D.'+选项D
ThisForm.OptionGroup1.Value=AT(答题,'ABCD')
()>1
()>1
()<RECCOUNT()
()<RECCOUNT()
(4)命令按钮组Click代码
DO CASE
CASE This.Value=1
GO TOP
CASE This.Value=2
SKIP -1
CASE This.Value=3
SKIP
CASE This.Value=4
GO BOTTOM
CASE This.Value=5
*这个是显示答题结果的部分,用messagebox()显示即可,答题对的:标准答案=答题
CASE This.Value=6
ThisForm.Release
ENDCASE
ThisForm.Refresh
(5)选项按钮组Click代码
replace 答题 WITH SUBSTR('ABCD',This.Value,1)