二级VFP表单题练习(2009级)
113、dsg1301.scx
114、dsg1401.scx
属性参考设置如下: (组合框和命令按钮组可使用生成器直接设置部分属性)
######
form Form1
AutoCenter = .T.
Caption = "组合框的使用"
######
label Label1
Caption = "请选择"
######
combobox Combo1
RowSourceType = 1
RowSource = "年,月,日"
######
commandgroup Commandgroup1
ButtonCount = 2
Command1.Caption = "确定"
Command2.Caption = "取消"
Command2.Enabled = .F.
######
属性参考设置如下: (命令按钮组可使用生成器直接设置部分属性)
######
form Form1
Caption = "多项选择"
######
container Container1
SpecialEffect = 1
######
checkbox Check1
Caption = "答案A"
######
checkbox Check2
Caption = "答案B"
######
checkbox Check3
Caption = "答案C"
######
checkbox Check4
Caption = "答案D"
######
commandgroup Commandgroup1
第 1 页 共 6 页
Command1.Caption = "确定"
Command2.Caption = "重选"
Command3.Caption = "退出"
115、dsg1501.scx
116、dsg1601.scx
属性参考设置如下: 属性参考设置如下: (列表框可使用生成器直接设置部分属性)
###### form Form1 Caption = "国家代码
查询" ###### listbox List1 RowSourceType = 6 RowSource = "国家名称,国家代码" ###### label Label1 AutoSize = .T. Caption = "国家名称" ###### label Label2 AutoSize = .T. Caption = "国家代码" ###### ######
form Form1
Caption = "登录界面"
######
container Container1
SpecialEffect = 0
######
label Label1
Caption = "用户名"
######
label Label2
Caption = "密码"
######
commandbutton Command1
Caption = "确定"
######
textbox Text2
Pass
wordChar = "*"
######
第 2 页 共 6 页
117、dsg1701.scx
------------------------------以下题目------------------------------ 注:不得新建表单,不得增、删原表单上的控件,不得更改Class属性(类名) 和Name属性(对象名) ; 表单运行后关闭,否则不得分。 --------------------------------------------------------------------- 213、dsg1302.scx
属性参考设置如下:
######
form Form1
AutoCenter = .T.
Caption = "页面选择"
######
pageframe Pageframe1
Page1.Caption = "第一页"
Page1.BackColor = 255,0,0
Page2.Caption = "第二页"
Page3.Caption = "第三页"
######
commandbutton Command1
Caption = "确定"
######
参考解答:编写“统计”按钮的click事件代码如下:
if thisform.optiongroup1.value=1
thisform.grid1.recordsource="sele 客户号,count(订单号) as 订单数,avg(金额) as 平均金额
from orders group by 客户号 into cursor lsb"
endif
if thisform.optiongroup1.value=2
thisform.grid1.recordsource="sele 职员号,count(订单号) as 订单数,avg(金额) as 平均金额
from orders group by 职员号 into cursor lsb"
endif
thisform.refresh
214、dsg1402.scx
第 3 页 共 6 页
216、dsg1602.scx
参考解答:编写“显示”按钮的click事件代码如下:
cglb=thisformbo1.value
thisform.grid1.recordsource="sele rcda.人才编号,,成果名称 from cjda,rcda where rcda.人才 编号=cjda.人才编号 and 成果类别=cglb into cursor lsb"
sele count(*) from lsb into array a
thisform.text1.value=a(1)
thisform.refresh
215、dsg1502.scx
参考解答:编写
列表框list1的click事件代码如下:
gsxm=this.value
thisform.list2.rowsource="sele 评委编号,分数 from gsb,pfb where gsb.歌手编号=pfb.歌手编 号 and 歌手=gsxm into cursor lsb"
sele avg(分数) from lsb into array a
thisform.text1.value=a(1)
thisform.refresh
217、dsg1702.scx
参考解答:编写组合框的click事件代码如下:
xb=this.value
thisform.list1.rowsource="sele 教师名,系名,基本工资 from ddm1,teach1