发布时间 : 星期六 文章《Visual FoxPro》期末考试题(机考)更新完毕开始阅读ef5c2801c8aedd3383c4bb4cf7ec4afe05a1b16f
××××××××装 订 线 内 请 勿 答 题××××××××××××××××××(2) 设置控件相应的属性(10分)
(3) 编写代码,完成整个表单的运行(10)
三、程序题(30分)
创建表单并编写程序,通过放大、缩小按钮完成图片按10%的比例进行缩放,四个移动按钮完成图片按每次50像素的固
定距离进行相应的移动操作,表单如下图所示:
(1)建立表单并添加相应控件(10分) (2)设置控件相应的属性(10分)
(3)编写代码,完成整个表单的运行(20) 二、程序题(30分)
创建表单编写程序,完成标签内文字字体、字号和字形的相应变化。表单如下图所示:
(1) 建立表单并添加相应控件(10分)
一、程序题(40分)
创建表单并编写程序,通过输入两个数,计算单选按钮选择算术运算符号,然后通过标签显示第一个数与第二个数加减乘除后的结果,表单如下图所示:
专业 班级 姓名 学号
(1) 建立表单并添加相应控件(10
分) (2) 设置控件相应的属性(10分) (3) 编写代码,完成整个表单的运
行(10)
答案: 第一题:
第 1 页 共 2 页
Command1的click事件代码: x=thisform.text1.value y=thisform.text2.value
if thisform.optiongroup1.option1.value=1 thisform.label3.caption=\结果为:\ else
if thisform.optiongroup1.option2.value=1
thisform.label3.caption=\结果为:\ else
if thisform.optiongroup1.option3.value=1 thisform.label3.caption=\结果为:\ else
thisform.optiongroup1.option4.value=1
thisform.label3.caption=\结果为:\ endif endif endif
Command2的click事件代码: thisform.release
第二题:
Command1的click事件代码:
thisform.label1.fontbold=thisform.check1.value thisform.label1.fontitalic=thisform.check2.value thisform.label1.fontunderline=thisform.check3.value
label1的click事件代码: thisform.label1.fontsize=12 thisform.label1.fontname=\华文琥珀\
thisform.label1.forecolor=rgb(123,12,13) 第三题:
Command1的click事件代码:
thisform.image1.height=1.1*thisform.image1.height thisform.image1.width=1.1*thisform.image1.width Command2的click事件代码:
thisform.image1.height=0.9*thisform.image1.height thisform.image1.width=0.9*thisform.image1.width Command3的click事件代码: if thisform.image1.left<>0
thisform.image1.left=thisform.image1.left+50 endif
Command4的click事件代码: if thisform.image1.top<>0
thisform.image1.top=thisform.image1.top+50 endif
Command5的click事件代码: if thisform.image1.top>0
thisform.image1.top=thisform.image1.top-50 endif
Command6的click事件代码: if thisform.image1.left>0
thisform.image1.left=thisform.image1.left-50 endif
第 2 页 共 2 页