Vfp(下)选择题.doc_第1页
Vfp(下)选择题.doc_第2页
Vfp(下)选择题.doc_第3页
Vfp(下)选择题.doc_第4页
Vfp(下)选择题.doc_第5页
已阅读5页,还剩1页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

一、程序选择填空题1下面程序实现口令判断,当第三次输入出错时退出表单。表单Form1的Init事件代码: (1) a=0use 学生this.text1.value=”this.text1.passwordchar=”*”this.label1.visible=.f. (2) 文本框Text1的Valid事件代码: (3) if found() thisform.label1.caption=口令正确! thisform.label1.visible=.t. retu .t.else (4) thisform.label1.caption=已经三次错误! thisform.label1.visible=.t. thisform.release else thisform.label1.caption=口令有错,重新输入! thisform.label1.visible=.t. a=a+1 retu .f. endifendif 【供选择的答案】(1) a、public ab、local ac、para ad、可以省略(2) a、this.text1.setfocus=.f.b、this.text1.setfocus c、this.text1.setfocus=.t.d、thisform.text.setfocus(3) a、seek thisform.text1.value b、seek for 姓名=allt(thisform.text1.value) c、loca for 姓名=allt(thisform.text1.value) d、loca all 姓名=allt(thisform.text1.value)(4) a、if a=3b、if a=2c、if a3d、if a=32下面程序实现一只小球在表单的高度范围(顶部与底部)内作动态的上下滚动。表单Form1的Init事件代码:(已经新建了表单属性B)this.b=0erval=100 (1) thisform.shape1.curvature=99thisform.shape1.height=30thisform.shape1.width=30计时器timer1的timer事件代码: (2) thisform.b=1endifif thisform.shape1.top=0 thisform.b=0endif (3) thisform.shape1.top=thisform.shape1.top+1else thisform.shape1.top=thisform.shape1.top-1endif【供选择的答案】(1) a、this.timer1.show=.t.b、this.timer1.show=.f. c、this.timer1.enabled=.t.d、this.timer1.enabled=.f.(2) a、if thisform.shape1.top=thisform.height-30 b、if thisform.shape1.top=thisform.height-40 c、if thisform.shape1.bottom=thisform.height-30 d、if thisform.shape1.bottom=0(3) a、if this.b=0b、if this.b=1 c、if thisform.b=0d、if thisform.b=13下面程序实现形状(shape1)从圆形逐步变成正方形,又从正方形逐步变成圆形的过程。初始形状为红色底色的圆形,已新建a属性。表单Form1的Init事件代码:this.a=1 (1) erval=1000 (2) .width=100 .height=100 (3) endwith 计时器Timer1的Timer事件代码:if thisform.shape1.curvature=99 thisform.a=0endifif thisform.shape1.curvature=0 thisform.a=1endifb=thisform.shape1.curvatureif (4) thisform.shape1.curvature=b+1else thisform.shape1.curvature=b-1endif【供选择的答案】 (1) a、this.timer1.enabled=.t.b、this.timer.enabled=.t. c、this.enabled=.t.d、this.timer1.enabled=.f. (2) a、scan thisform.shape1b、with this.shape1 c、with thisformd、with shape1 (3) a、backcolor=rgb(255,0,0)b、.backcolor=rgb(255,0,0) c、.backcolor=rgb(0,255,0)d、backcolor=255 (4) a、a=1b、a=0c、thisform.a=0d、thisform.a=14本程序实现在文本框中每隔1秒逐步显示“欢迎各位朋友光临”。即先显示“欢”,隔1秒再显示“欢迎”,依此类推。显示完后再重新开始显示,共显示5遍。表单Form1的Init事件代码:public n (1) thisform.text1.value=erval=1000 (2) 计时器Timer1的Timer事件代码:a=欢迎各位朋友光临b=len(a) (3) if c=b if n=5 thisform.timer1.enabled=.f. else n=n+1 thisform.text1.value= endifelse (4) Endif【供选择的答案】 (1) a、store 0 to nb、n=1 c、cleard、set talk off (2) a、this.timer1.enabled=.t.b、thisform.refresh c、this.timer.enabled=.f.d、thisform.release (3) a、c=b、c=thisform.text1.value c、c=allt(thisform.text1.value)d、c=len(allt(thisform.text1.value) (4) a、this.value=substr(a,1,c+2)b、this.text1.value=substr(a,1,c+2) c、thisform.text1.value=substr(a,1,c+2) d、thisform.text1.value=substr(a,c+1,c+2)二、程序选择填空题1下面程序实现从学生表中抽取学生学号。表单Form1的Init事件代码:this.timer1.enabled=.f. (1) this.text1.value=”学生的学号”时钟控件timer1的 (2) 事件代码:skipif eof() go topendif (3) 命令按钮command1(开始)的 click 事件代码: (4) thisform.text1.forecolor=rgb(255,255,255)thisform.text1.value=学号命令按钮command2(停止)的 click 事件代码:thisform.timer1.enabled=.f.thisform.text1.forecolor=rgb(0,0,0)【供选择的答案】(1) a、erval=100 b、erval=0 c、erval=0d、this. interval=100(2) a、initb、timerc、clickd、timer1(3) a、thisform.releaseb、this.text1.value=学号 c、this.refreshd、thisform.text1.value=学号(4) a、thisform.timer1.begin=.t.b、thisform.timer1.begin=.f. c、thisform.timer1.enabled=.f.d、thisform.timer1.enabled=.t.2下面程序实现用户登录过程。表单Form1的Init事件代码:mand1.enabled=.mand2.enabled=.t.this.text2.passwordchar=*this.n=0文本框Text1的Valid事件代码: (1) if found()thisform.xm=allt(姓名)thisform.xh=allt(学号)elsemessagebox(用户名错误) (2) endif文本框Text2的Valid事件代码:if alltrim(this.value)thisform.xhthisform.n=thisform.n+1messagebox(口令错误) (3) mand1.enabled=.t.endif命令按钮Command1的Click事件代码:messagebox(欢迎!)命令按钮Command1的Click事件代码:thisform.release【供选择的答案】(1) a、locate for 姓名=this.valueb、locate for alltrim(姓名)=alltrim(this.value) c、seek for 姓名=this.valued、seek 姓名(2) a、returnb、return .t.c、this.gotfocusd、return .f.(3) a、if this.n3b、if thisform.n3c、if this.n2d、if thisform.n23选择程序的运行结果set talk offsele 1use 成绩index on 课程号 to x1sele 2use 课程set rela to 课程号 into ainput 输入课程名= to klocate for 课程名=allt(k)if .not. eof() if 学时数=90 skipelseskip -1

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论