- 2
- 0
- 约4.23千字
- 约 11页
- 2017-03-30 发布于江苏
- 举报
福建省VFP设计题及答案
设计一:
提示:
container1外观效果——specialeffect属(1)
命令按钮组个数——Buttoncount(3)
提示:
组合框的数据源类型——RowsourceType(1),在Rowsource输入——年,月,日(不用加“”);或者也可以使用组合框的生成器设置
命令按钮组个数——Buttoncount(2),将Command2初始设为不可用即将Command2得Enabled属性设置为.F.
提示:
表单的运行时自动居中——Autocenter(.T.)
页框个数——Pagecount(3)
要在第二页中增加Command1按钮,请从属性窗口中先选中Page2,在使用表单控件工具栏添加相应的控件
提示:
container1外观效果——specialeffect(0)
要在容器页中增加Command1与text各控件,请从属性窗口中先选中Container1,再使用表单控件工具栏添加相应的控件
text2中密码以占位符“*”显示——passwordchar(*)
提示:
列表框的数据源类型——Rowsourcetype(6),数据源设置使用列表框的生成器,在生成器把country.DBF的国家名称与国家代码加入
标签根据标题的长度自动调整标签大小——autosize(.T.)
设计二:
在显示按钮的CLICK事件中编写代码如下:
Dime x(1)
x(1)=0
thisform.grid1.recordsource=select rcda.人才编号,姓名,成果名称 from rcda,cjda where rcda. 人才编号=cjda. 人才编号and 成果类别=bo1.value into cursor tmp
select count(*) from cjda where 成果类别=bo1.value into array x
thisform.text1.value=x(1)
thisform.refresh
提示:
1从数据工作期窗口打开ORDERS.DBF,点击浏览查看其字段等信息
2.按照题目要求和相应信息,编写代码如下
if thisform.optiongroup1.value=1
thisform.grid1.recordsource=select 客户号,count(*) as 订单数,avg(金额) as 平均金额 from orders group by 客户号 into cursor tmp
else
thisform.grid1.recordsource=select 职员号,count(*) as 订单数,avg(金额) as 平均金额 from orders group by 职员号 into cursor tmp
endif
thisform.refresh
组合框Interactivechange的事件代码如下:
DIME x(1),y(1),z(1)
x(1)=0
y(1)=0
z(1)=0
thisform.grid1.recordsource=select * from grade where 课程号=bo1.value into cursor tmp
select count(*) from grade where 课程号=bo1.value and 成绩=85 into array x
thisform.text1.value=x(1)
select count(*) from grade where 课程号=bo1.value and 成绩=60 and 成绩=84 into array y
thisform.text2.value=y(1)
select count(*) from grade where 课程号=bo1.value and 成绩60 into array z
thisform.text3.value=z(1)
(题目无法打开,好象往年有该题,大家自己整理,答案与课本例子8.6类似)
请在组合框的click事件编写代码如下:
dime x(1)
x(1)=0
thisform.list1.rowsource=select Teach1.姓名,Teach1.系名,Teach1.基本工资 from Ddm1,Teach1 where Ddm1.系号=Teach1.系号 and 性别= bo1.value into cursor tmp
if thisform.check1.value=1
select sum(基本工资) from from Ddm1,Teach1 where Ddm1.系号=Teach1.系
原创力文档

文档评论(0)